Skip to main content
Glama

Get Jurisdiction

openstates_get_jurisdiction
Read-onlyIdempotent

Fetch full metadata for a specific jurisdiction including all legislative sessions, their identifiers, and coverage dates. Use when you need to know the exact session identifier for a state before filtering bill searches — session formats vary widely (e.g., "2025", "2025rs", "2025s1"). Jurisdiction IDs follow OCD format: ocd-jurisdiction/country:us/state:{abbr}/government (e.g., ocd-jurisdiction/country:us/state:wa/government). State names (e.g., "Washington") and two-letter abbreviations (e.g., "wa") are also accepted.

Input Schema

NameRequiredDescriptionDefault
includeNoRelated data to inline. "legislative_sessions" returns all historical and current sessions with identifiers and date ranges. "organizations" lists the jurisdiction's legislative chambers and executive bodies. "latest_runs" shows last scraper run metadata.
jurisdiction_idYesOCD jurisdiction ID, state name (e.g., "Washington"), or two-letter abbreviation (e.g., "wa").

Output Schema

NameRequiredDescriptionDefault
idNoOCD jurisdiction ID.
urlNoOfficial legislature URL.
nameNoJurisdiction name.
errorNoPresent when the call failed. Absent on success.
latest_runsNoRecent scraper runs when include=latest_runs is requested.
organizationsNoLegislative chambers and executive bodies when include=organizations is requested.
classificationNoJurisdiction type.
latest_bill_updateNoISO 8601 timestamp of most recent bill data update.
latest_people_updateNoISO 8601 timestamp of most recent people data update.
legislative_sessionsNoAll legislative sessions when include=legislative_sessions is requested.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `not_found`: Jurisdiction ID does not exist in Open States. `upstream_timeout`: Open States did not answer within the per-request timeout. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `not_found`: Jurisdiction ID does not exist in Open States. `upstream_timeout`: Open States did not answer within the per-request timeout. `rate_limited`: The shared Open States API key reached a request cap — Open States' per-minute or daily limit, or this server's own daily budget. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "not_found",
      -  "upstream_timeout"
      -]New value: +[
      +  "not_found",
      +  "upstream_timeout",
      +  "rate_limited"
      +]
  2. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "id",
      +      "name",
      +      "classification",
      +      "url",
      +      "latest_bill_update",
      +      "latest_people_update"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `not_found`: Jurisdiction ID does not exist in Open States. `upstream_timeout`: Open States did not answer within the per-request timeout. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "not_found",
      +            "upstream_timeout"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "id",
      -  "name",
      -  "classification",
      -  "url",
      -  "latest_bill_update",
      -  "latest_people_update"
      -]
  3. Changed3 schema fields changed
    • changedOutput schema / properties / legislative_sessions / items / properties / classification / description
      Previous value: -"Session classification: \"primary\", \"special\", etc."New value: +"Session classification: \"primary\", \"special\", etc. Empty string when Open States recorded none, which covers 28% of sessions — 13 jurisdictions carry no classification on any session at all."
    • changedOutput schema / properties / legislative_sessions / items / properties / end_date / description
      Previous value: -"Session end date."New value: +"Session end date. Empty string when Open States recorded no value; an absent endpoint means unknown, not ongoing."
    • changedOutput schema / properties / legislative_sessions / items / properties / start_date / description
      Previous value: -"Session start date."New value: +"Session start date. Empty string when Open States recorded no value; an absent endpoint means unknown, not ongoing."
  4. Changed3 schema fields changed
    • changedInput schema / properties / include / description
      Previous value: -"Related data to inline. \"legislative_sessions\" returns all historical and current sessions with identifiers and date ranges. \"latest_runs\" shows last scraper run metadata."New value: +"Related data to inline. \"legislative_sessions\" returns all historical and current sessions with identifiers and date ranges. \"organizations\" lists the jurisdiction's legislative chambers and executive bodies. \"latest_runs\" shows last scraper run metadata."
    • addedOutput schema / properties / latest_runs
      Added value: +{
      +  "description": "Recent scraper runs when include=latest_runs is requested.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Scraper run record.",
      +    "properties": {
      +      "end_time": {
      +        "description": "ISO 8601 timestamp when the run finished. Absent when unrecorded.",
      +        "type": "string"
      +      },
      +      "start_time": {
      +        "description": "ISO 8601 timestamp when the scraper run started.",
      +        "type": "string"
      +      },
      +      "success": {
      +        "description": "Whether the run succeeded. Absent when not recorded.",
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "start_time"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / organizations
      Added value: +{
      +  "description": "Legislative chambers and executive bodies when include=organizations is requested.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Organization record.",
      +    "properties": {
      +      "classification": {
      +        "description": "Organization type (e.g., \"upper\", \"lower\", \"legislature\").",
      +        "type": "string"
      +      },
      +      "id": {
      +        "description": "OCD organization ID.",
      +        "type": "string"
      +      },
      +      "name": {
      +        "description": "Organization name (e.g., \"Washington State Senate\").",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  5. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the safety profile needs no restating. The description adds genuinely new behavior facts: session identifier formats vary widely across states and the tool accepts three different ID/name forms, which tells the agent the input is forgiving. It stops short of describing pagination or behavior when a jurisdiction is not found, so not 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?

Four sentences, each doing work, with the core purpose and the primary use case front-loaded. The final sentence on ID formats is dense but necessary for correct invocation. Slightly long, but nothing is redundant.

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

Completeness5/5

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

An output schema exists, so return values need not be described. With only two parameters, complete schema coverage, and annotations covering safety, the description supplies the remaining unknowns — the usage trigger and input format tolerance — leaving nothing an agent needs before calling it.

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 description coverage is 100%, so the baseline is 3. The description adds value beyond that by documenting the accepted input forms with concrete examples of the OCD format and noting state names and abbreviations work. The `include` parameter's behavior is left entirely to the schema, which already explains it well.

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?

States a specific verb (fetch) and resource (full metadata for a specific jurisdiction) and enumerates the payload: legislative sessions, identifiers, coverage dates. The word 'specific' plus the singular resource cleanly separates it from the sibling openstates_list_jurisdictions.

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?

Explicitly names the trigger: 'Use when you need to know the exact session identifier for a state before filtering bill searches.' That ties this tool to a concrete downstream action (openstates_search_bills filtering), so an agent knows why and when to call it rather than guessing.

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.