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

TableJSON 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

TableJSON 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. 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"
      -]
  2. 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."
  3. 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"
      +}
  4. First observed

TDQS

A4.3/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 is covered. The description adds value by describing the returned metadata (sessions, identifiers, coverage dates) and accepted ID formats, which goes beyond the annotations. There is no contradiction with the read-only and idempotent hints.

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

Conciseness5/5

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

The description is three sentences with no filler. It is front-loaded with the action and purpose, then gives the use case and ID formats. Every sentence contributes essential information, making it concise and well-structured.

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?

Given the presence of an output schema and annotations that cover safety, the description provides everything an agent needs: the purpose, the trigger condition, the parameter formats, and what data to expect. No critical information is missing for correct invocation.

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

Parameters3/5

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

Schema description coverage is 100% and both parameters are well documented in the schema. The description reinforces the jurisdiction_id formats but adds little beyond that. It implies sessions are always included, whereas the 'include' parameter makes them optional, which is slightly ambiguous. Thus the description provides only marginal added value over the schema.

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 states a specific action ('fetch full metadata'), a clear resource ('a specific jurisdiction'), and the key content returned (legislative sessions, identifiers, coverage dates). It also gives a concrete use case (getting session identifiers for bill searches) and names the exact OCD format, which distinguishes it from sibling tools like list_jurisdictions or search_bills.

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

Usage Guidelines4/5

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

It clearly instructs when to use this tool: 'Use when you need to know the exact session identifier for a state before filtering bill searches.' This is a strong contextual trigger. However, it does not explicitly mention alternatives or when not to use it, so it falls short of the full 'when-not/alternatives' criterion.

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.