{
  "server": "latlong-map",
  "url": "https://geocp.latlong.ai/mcp/",
  "date": "2026-09-23",
  "protocolVersion": "2025-11-25",
  "serverInfo": {
    "name": "latlong-maps",
    "version": "1.0.0"
  },
  "listChangedDeclared": true,
  "toolCount": 4,
  "outputSchemaCoveragePct": 100,
  "tools": [
    {
      "description": "Start a client-direct file upload for large CSV/XLSX files. Returns a presigned put_url and an opaque upload_id. Steps: 1) call create_upload with file_name, 2) HTTP PUT the raw file bytes to put_url using the returned headers, 3) pass upload_id to question_to_map, parse_file, or render_map. Preferred over file_base64 for anything beyond a few KB — the bytes go straight to storage instead of riding inside the tool call.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "file_name": {
            "type": "string"
          }
        },
        "required": [
          "file_name"
        ],
        "type": "object"
      },
      "name": "create_upload",
      "outputSchema": {
        "additionalProperties": false,
        "properties": {
          "expires_at": {
            "type": "string"
          },
          "headers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "max_size_bytes": {
            "type": "integer"
          },
          "put_expires_at": {
            "type": "string"
          },
          "put_url": {
            "type": "string"
          },
          "upload_id": {
            "type": "string"
          }
        },
        "required": [
          "upload_id",
          "put_url",
          "headers",
          "put_expires_at",
          "expires_at",
          "max_size_bytes"
        ],
        "type": "object"
      }
    },
    {
      "description": "Return the server's capability matrix (supported map types, geo types, output formats, and classification methods).",
      "inputSchema": {
        "additionalProperties": false,
        "type": "object"
      },
      "name": "get_capabilities",
      "outputSchema": {
        "additionalProperties": false,
        "properties": {
          "auto_level_detection": {
            "type": "boolean"
          },
          "available_indices": {
            "items": {
              "type": "string"
            },
            "type": [
              "null",
              "array"
            ]
          },
          "available_tools": {
            "items": {
              "type": "string"
            },
            "type": [
              "null",
              "array"
            ]
          },
          "classification_methods": {
            "items": {
              "type": "string"
            },
            "type": [
              "null",
              "array"
            ]
          },
          "default_output": {
            "type": "string"
          },
          "geo_detection": {
            "type": "boolean"
          },
          "geo_levels": {
            "items": {
              "type": "string"
            },
            "type": [
              "null",
              "array"
            ]
          },
          "guidance": {
            "additionalProperties": false,
            "properties": {
              "allow_freeform": {
                "type": "boolean"
              },
              "next_actions": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "arguments": {
                      "additionalProperties": true,
                      "type": "object"
                    },
                    "arguments_from": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "tool"
                  ],
                  "type": "object"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "next_steps_text": {
                "type": "string"
              }
            },
            "required": [
              "next_actions",
              "allow_freeform",
              "next_steps_text"
            ],
            "type": [
              "null",
              "object"
            ]
          },
          "index_modes": {
            "items": {
              "type": "string"
            },
            "type": [
              "null",
              "array"
            ]
          },
          "map_types": {
            "items": {
              "type": "string"
            },
            "type": [
              "null",
              "array"
            ]
          },
          "output_formats": {
            "items": {
              "type": "string"
            },
            "type": [
              "null",
              "array"
            ]
          },
          "png_supported": {
            "type": "boolean"
          },
          "stateless_only": {
            "type": "boolean"
          },
          "svg_default": {
            "type": "boolean"
          }
        },
        "required": [
          "map_types",
          "geo_levels",
          "output_formats",
          "default_output",
          "classification_methods",
          "available_indices",
          "index_modes",
          "geo_detection",
          "auto_level_detection",
          "svg_default",
          "png_supported",
          "stateless_only",
          "available_tools"
        ],
        "type": "object"
      }
    },
    {
      "description": "Validate and ingest a file uploaded via create_upload. Runs size, virus, and content-safety checks, parses CSV/XLSX/JSON, and returns an upload_id plus advisory intent (no raw rows). IMPORTANT: to make a map, call question_to_map and pass this upload_id — and pass the SAME upload_id on every follow-up question about this file (e.g. 'now show it by district'). The response includes a ready-to-use next_actions entry with upload_id already filled in; prefer firing that. Rejects infected or injected files (nothing is kept in that case).",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "geo_column": {
            "type": "string"
          },
          "geo_level": {
            "type": "string"
          },
          "map_type": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "upload_id": {
            "type": "string"
          },
          "value_column": {
            "type": "string"
          }
        },
        "required": [
          "upload_id"
        ],
        "type": "object"
      },
      "name": "process_upload",
      "outputSchema": {
        "additionalProperties": false,
        "properties": {
          "column_count": {
            "type": "integer"
          },
          "guidance": {
            "additionalProperties": false,
            "properties": {
              "allow_freeform": {
                "type": "boolean"
              },
              "next_actions": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "arguments": {
                      "additionalProperties": true,
                      "type": "object"
                    },
                    "arguments_from": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "tool"
                  ],
                  "type": "object"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "next_steps_text": {
                "type": "string"
              }
            },
            "required": [
              "next_actions",
              "allow_freeform",
              "next_steps_text"
            ],
            "type": [
              "null",
              "object"
            ]
          },
          "intent": {
            "additionalProperties": false,
            "properties": {
              "confidence": {
                "type": "number"
              },
              "geo_column": {
                "type": "string"
              },
              "geo_level": {
                "type": "string"
              },
              "map_type": {
                "type": "string"
              },
              "note": {
                "type": "string"
              },
              "source": {
                "type": "string"
              },
              "value_column": {
                "type": "string"
              }
            },
            "required": [
              "source"
            ],
            "type": [
              "null",
              "object"
            ]
          },
          "row_count": {
            "type": "integer"
          },
          "upload_id": {
            "type": "string"
          }
        },
        "required": [
          "upload_id",
          "intent",
          "column_count",
          "row_count"
        ],
        "type": "object"
      }
    },
    {
      "description": "Render a geographic map from a question.\n\nTO MAP A FILE (CSV/XLSX/JSON) — you MUST upload it first, in this order:\n  1) call create_upload {file_name} -\u003e returns { upload_id, put_url }\n  2) HTTP PUT the raw file bytes to put_url (use the returned headers)\n  3) call process_upload {upload_id, ...your intent} -\u003e validates the file\n  4) call question_to_map {question, upload_id, geo_column?, value_column?}\nDo NOT call question_to_map with a file path or the raw bytes for an uploaded document — pass the upload_id from step 1. Reuse the SAME upload_id on every follow-up about that file (e.g. 'now show it by district').\n\nWays to provide data:\n1. Uploaded document (preferred): {\"question\": \"show total by pincode\", \"upload_id\": \"\u003cfrom create_upload\u003e\", \"geo_column\": \"pincode\", \"value_column\": \"total\"}\n2. Question only (DB): {\"question\": \"ola sales in delhi ncr\"}\n3. CSV inline (small only): {\"question\": \"show sales\", \"csv\": \"state,sales\\nMaharashtra,500\", \"geo_column\": \"state\", \"value_column\": \"sales\"}\n\nINTENT (all optional; if you know them, pass them — your values win over auto-detection): geo_column, value_column, geo_level (state|district|pincode|rto|city|ac|pc), map_type, state_hint.\nIf you omit upload_id, the server falls back to your most recent upload; passing it is more reliable.\nIf value_column is 'total' and absent from the data, all numeric columns are summed automatically.\nSupported geo types: state, district, pincode, rto, city, ac, pc.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "csv": {
            "type": "string"
          },
          "data": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": [
              "null",
              "array"
            ]
          },
          "detected_geo": {
            "additionalProperties": false,
            "properties": {
              "column": {
                "type": "string"
              },
              "confidence": {
                "type": "number"
              },
              "geo_type": {
                "type": "string"
              },
              "matched_count": {
                "type": "integer"
              },
              "parent": {
                "type": "string"
              },
              "total_count": {
                "type": "integer"
              }
            },
            "required": [
              "column",
              "geo_type",
              "confidence",
              "matched_count",
              "total_count"
            ],
            "type": [
              "null",
              "object"
            ]
          },
          "enrich_with": {
            "additionalProperties": false,
            "properties": {
              "columns": {
                "items": {
                  "type": "string"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "join_on": {
                "type": "string"
              },
              "table": {
                "type": "string"
              }
            },
            "required": [
              "table",
              "columns"
            ],
            "type": [
              "null",
              "object"
            ]
          },
          "file_path": {
            "type": "string"
          },
          "geo_column": {
            "type": "string"
          },
          "geo_level": {
            "type": "string"
          },
          "map_type": {
            "type": "string"
          },
          "output_format": {
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "render_params": {
            "additionalProperties": true,
            "type": "object"
          },
          "state_hint": {
            "items": {
              "type": "string"
            },
            "type": [
              "null",
              "array"
            ]
          },
          "style": {
            "additionalProperties": true,
            "type": "object"
          },
          "table": {
            "type": "string"
          },
          "upload_id": {
            "type": "string"
          },
          "value_column": {
            "type": "string"
          }
        },
        "required": [
          "question"
        ],
        "type": "object"
      },
      "name": "question_to_map",
      "outputSchema": {
        "additionalProperties": false,
        "properties": {
          "aggregation_applied": {
            "additionalProperties": false,
            "properties": {
              "aggregated_rows": {
                "type": "integer"
              },
              "grouped_by": {
                "type": "string"
              },
              "method": {
                "type": "string"
              },
              "note": {
                "type": "string"
              },
              "original_rows": {
                "type": "integer"
              }
            },
            "required": [
              "original_rows",
              "aggregated_rows",
              "method",
              "note"
            ],
            "type": [
              "null",
              "object"
            ]
          },
          "computed_data": {
            "additionalProperties": false,
            "properties": {
              "columns": {
                "items": {
                  "type": "string"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "returned_rows": {
                "type": "integer"
              },
              "rows": {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "sort_column": {
                "type": "string"
              },
              "sort_order": {
                "type": "string"
              },
              "total_rows": {
                "type": "integer"
              }
            },
            "required": [
              "columns",
              "rows",
              "total_rows",
              "returned_rows"
            ],
            "type": [
              "null",
              "object"
            ]
          },
          "confidence": {
            "type": "number"
          },
          "guidance": {
            "additionalProperties": false,
            "properties": {
              "allow_freeform": {
                "type": "boolean"
              },
              "next_actions": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "arguments": {
                      "additionalProperties": true,
                      "type": "object"
                    },
                    "arguments_from": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    },
                    "tool": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "tool"
                  ],
                  "type": "object"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "next_steps_text": {
                "type": "string"
              }
            },
            "required": [
              "next_actions",
              "allow_freeform",
              "next_steps_text"
            ],
            "type": [
              "null",
              "object"
            ]
          },
          "level_resolution": {
            "additionalProperties": false,
            "properties": {
              "aggregations": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "columns": {
                      "items": {
                        "type": "string"
                      },
                      "type": [
                        "null",
                        "array"
                      ]
                    },
                    "dataset": {
                      "type": "string"
                    },
                    "from_level": {
                      "type": "string"
                    },
                    "method": {
                      "type": "string"
                    },
                    "to_level": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "dataset",
                    "from_level",
                    "to_level",
                    "method",
                    "columns"
                  ],
                  "type": "object"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "alternatives": {
                "items": {
                  "type": "string"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "datasets": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "geo_col": {
                      "type": "string"
                    },
                    "level": {
                      "type": "string"
                    },
                    "rows": {
                      "type": "integer"
                    },
                    "source": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "source",
                    "level",
                    "geo_col",
                    "rows"
                  ],
                  "type": "object"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "method": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "resolved_level": {
                "type": "string"
              }
            },
            "required": [
              "datasets",
              "resolved_level",
              "method"
            ],
            "type": [
              "null",
              "object"
            ]
          },
          "map": {
            "additionalProperties": false,
            "properties": {
              "active_count": {
                "type": "integer"
              },
              "dimensions": {
                "additionalProperties": false,
                "properties": {
                  "height": {
                    "type": "integer"
                  },
                  "width": {
                    "type": "integer"
                  }
                },
                "required": [
                  "width",
                  "height"
                ],
                "type": [
                  "null",
                  "object"
                ]
              },
              "expires_at": {
                "type": "string"
              },
              "format": {
                "type": "string"
              },
              "geo_scope": {
                "type": "string"
              },
              "html_url": {
                "type": "string"
              },
              "join_summary": {
                "additionalProperties": false,
                "properties": {
                  "matched": {
                    "type": "integer"
                  },
                  "total": {
                    "type": "integer"
                  },
                  "unmatched": {
                    "type": "integer"
                  }
                },
                "required": [
                  "matched",
                  "unmatched",
                  "total"
                ],
                "type": [
                  "null",
                  "object"
                ]
              },
              "render_id": {
                "type": "string"
              },
              "subtitle": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "total_count": {
                "type": "integer"
              },
              "total_value": {
                "type": "string"
              },
              "url": {
                "type": "string"
              },
              "value_label": {
                "type": "string"
              }
            },
            "required": [
              "url",
              "format",
              "render_id"
            ],
            "type": [
              "null",
              "object"
            ]
          },
          "mode": {
            "type": "string"
          },
          "resolution_method": {
            "type": "string"
          },
          "resolved_params": {
            "additionalProperties": false,
            "properties": {
              "geo_column": {
                "type": "string"
              },
              "geo_type": {
                "type": "string"
              },
              "map_type": {
                "type": "string"
              },
              "state_hint": {
                "items": {
                  "type": "string"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "style": {
                "additionalProperties": true,
                "type": "object"
              },
              "value_column": {
                "type": "string"
              }
            },
            "required": [
              "map_type",
              "geo_type",
              "geo_column",
              "value_column"
            ],
            "type": [
              "null",
              "object"
            ]
          },
          "usage": {
            "additionalProperties": false,
            "properties": {
              "breakdown": {
                "additionalProperties": {
                  "type": "integer"
                },
                "type": "object"
              },
              "month_limit": {
                "type": "integer"
              },
              "month_remaining": {
                "type": "integer"
              },
              "month_used": {
                "type": "integer"
              },
              "this_call": {
                "type": "integer"
              }
            },
            "required": [
              "this_call",
              "breakdown",
              "month_used",
              "month_limit",
              "month_remaining"
            ],
            "type": [
              "null",
              "object"
            ]
          }
        },
        "required": [
          "mode"
        ],
        "type": "object"
      }
    }
  ]
}
