Skip to main content
Glama

find_polity

Read-onlyIdempotent

Use for the lifespan and recorded border changes of a named state or empire. Matches names and Wikidata labels or aliases by case-insensitive substring, or matches a Wikidata QID. Returns matching polities with dated snapshots, bounding boxes and links. Multiple matches can share a name; a Wikidata QID helps disambiguate. Zero matches means the catalogue found no record. For polities with documented borders in a given year, use world_at_year.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "find_polity"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoSite language for returned page and map links. Use the language the user is writing in.en
limitNoMaximum results to return in this page.
queryYesName, e.g. "Ottoman", or a QID, e.g. "Q12560".
offsetNoPass the previous result’s next_offset with the same filters to continue.

Output Schema

NameRequiredDescriptionDefault
countYes
coverageYes
politiesYes
returnedYesNumber of records in this page.
attributionYes
next_offsetYesOffset for the next page with the same filters, or null at the end.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 10,
      +  "description": "Maximum results to return in this page.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Pass the previous result’s next_offset with the same filters to continue.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "attribution": {
      +      "properties": {
      +        "attribution": {
      +          "type": "string"
      +        },
      +        "licence": {
      +          "type": "string"
      +        },
      +        "note": {
      +          "type": "string"
      +        },
      +        "source": {
      +          "type": "string"
      +        },
      +        "url": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "source",
      +        "url",
      +        "licence",
      +        "attribution"
      +      ],
      +      "type": "object"
      +    },
      +    "count": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "coverage": {
      +      "properties": {
      +        "earliest_record": {
      +          "type": "string"
      +        },
      +        "note": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "earliest_record",
      +        "note"
      +      ],
      +      "type": "object"
      +    },
      +    "next_offset": {
      +      "description": "Offset for the next page with the same filters, or null at the end.",
      +      "minimum": 0,
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "polities": {
      +      "items": {
      +        "properties": {
      +          "also_known_as": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "battles_on_territory": {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "bbox": {
      +            "description": "Bounding box [west, south, east, north] in degrees.",
      +            "items": {
      +              "type": "number"
      +            },
      +            "maxItems": 4,
      +            "minItems": 4,
      +            "type": "array"
      +          },
      +          "border_snapshots": {
      +            "items": {
      +              "properties": {
      +                "bbox": {
      +                  "description": "Bounding box [west, south, east, north] in degrees.",
      +                  "items": {
      +                    "type": "number"
      +                  },
      +                  "maxItems": 4,
      +                  "minItems": 4,
      +                  "type": "array"
      +                },
      +                "from": {
      +                  "type": "string"
      +                },
      +                "map": {
      +                  "type": "string"
      +                },
      +                "to": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "from",
      +                "to",
      +                "bbox",
      +                "map"
      +              ],
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          "from": {
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "page": {
      +            "type": "string"
      +          },
      +          "to": {
      +            "type": "string"
      +          },
      +          "wikidata": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "from",
      +          "to",
      +          "wikidata",
      +          "page",
      +          "bbox",
      +          "battles_on_territory",
      +          "border_snapshots"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "returned": {
      +      "description": "Number of records in this page.",
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "count",
      +    "returned",
      +    "next_offset",
      +    "coverage",
      +    "attribution",
      +    "polities"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / lang
      Added value: +{
      +  "default": "en",
      +  "description": "Site language for returned page and map links. Use the language the user is writing in.",
      +  "enum": [
      +    "en",
      +    "fr",
      +    "es",
      +    "pt",
      +    "de",
      +    "it",
      +    "nl",
      +    "ja",
      +    "ru",
      +    "pl",
      +    "tr",
      +    "id",
      +    "hi",
      +    "ar"
      +  ],
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds genuinely new behavioral context beyond that: case-insensitive substring matching against names/labels/aliases, QID matching, the fact that multiple polities can share a name, and that zero matches means no catalogue record rather than an error. It stops short of describing pagination behavior or result ordering, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with 'Use for...' and each subsequent sentence adds a distinct fact: matching rules, return contents, disambiguation, empty-result semantics, and the sibling alternative. The sentence enumerating return contents ('dated snapshots, bounding boxes and links') is partly redundant given an output schema exists, but it is short and orienting rather than wasteful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter lookup tool with full schema coverage, an output schema, and annotations, the description covers selection, matching semantics, disambiguation, and empty results — everything an agent needs to invoke it correctly. The minor gap is that pagination continuation (offset/next_offset) is left entirely to the schema, but that is a small omission given how rich the rest of the definition is.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description goes beyond the schema by explaining the matching semantics of 'query' (case-insensitive substring across names, Wikidata labels and aliases) and why a QID is preferable when names collide, which is meaning the schema alone does not convey. It says nothing extra about limit/offset/lang, which the schema already documents adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'lifespan and recorded border changes of a named state or empire.' It states the matching mechanism (name/label/alias substring or QID) and explicitly contrasts itself with the sibling world_at_year, so an agent can distinguish the two without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit alternative and the condition that selects it: 'For polities with documented borders in a given year, use world_at_year.' It also gives disambiguation guidance ('a Wikidata QID helps disambiguate') and what a zero-result outcome means, so the agent knows how to react to each result shape.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources