Skip to main content
Glama

Get Bill

openstates_get_bill
Read-onlyIdempotent

Fetch full detail for a specific state bill. Accepts either the three-part path (jurisdiction + session + bill_id) or a direct OCD bill ID (openstates_id from search results). Use include to request votes, actions, sponsorships, documents, and versions in one call rather than searching again. include=votes returns the full vote tally and per-legislator positions. include=actions returns the complete action history. Prefer openstates_id when available to avoid session identifier lookup.

Input Schema

NameRequiredDescriptionDefault
bill_idNoBill identifier as used by the legislature (e.g., "HB 1000", "SB 42"). Required with jurisdiction + session.
includeNoRelated data to inline. "sponsorships", "actions", "votes" are most commonly needed. "versions" and "documents" provide links to bill text and fiscal notes.
sessionNoSession identifier. Required with jurisdiction + bill_id.
jurisdictionNoState name, abbreviation, or OCD-ID. Required when using path-based lookup with session + bill_id.
openstates_idNoOCD bill ID from openstates_search_bills results: "ocd-bill/" followed by a UUID (e.g., "ocd-bill/4f255ccf-42a6-46ad-bbc6-0b027ebb15f2"). Preferred over the three-part path when available.

Output Schema

NameRequiredDescriptionDefault
idNoOCD bill ID.
errorNoPresent when the call failed. Absent on success.
titleNoBill title.
votesNoVote events when include=votes is requested.
actionsNoFull action history when include=actions is requested.
sessionNoLegislative session identifier.
sourcesNoSource documents when include=sources is requested.
subjectNoSubject tags.
versionsNoBill text versions when include=versions is requested.
abstractsNoBill abstracts when include=abstracts is requested.
documentsNoBill documents (fiscal notes, etc.) when include=documents is requested.
identifierNoBill identifier as used by the legislature.
updated_atNoTimestamp Open States last updated this record — the field openstates_search_bills sorts by under the default sort=updated_desc.
jurisdictionNoOriginating jurisdiction.
other_titlesNoAlternate titles when include=other_titles is requested.
sponsorshipsNoSponsorships when include=sponsorships is requested.
related_billsNoRelated bills when include=related_bills is requested.
classificationNoBill classifications.
openstates_urlNoOpen States URL for this bill.
first_action_dateNoDate of first recorded action.
from_organizationNoOriginating chamber.
other_identifiersNoAlternate identifiers when include=other_identifiers is requested.
latest_action_dateNoDate of most recent action.
latest_passage_dateNoDate bill passed (when applicable).
latest_action_descriptionNoMost recent action description.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / openstates_id / description
      Previous value: -"OCD bill ID from openstates_search_bills results (e.g., \"ocd-bill/...\"). Preferred over the three-part path when available."New value: +"OCD bill ID from openstates_search_bills results: \"ocd-bill/\" followed by a UUID (e.g., \"ocd-bill/4f255ccf-42a6-46ad-bbc6-0b027ebb15f2\"). Preferred over the three-part path when available."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `missing_lookup_params`: Neither openstates_id nor the complete jurisdiction+session+bill_id triple was provided. `not_found`: Bill does not exist at the given path or OCD ID. `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: `missing_lookup_params`: Neither openstates_id nor the complete jurisdiction+session+bill_id triple was provided. `invalid_openstates_id`: openstates_id is not an Open States bill ID — neither \"ocd-bill/\" followed by a UUID nor a jurisdiction/session/bill_id path. `not_found`: No bill exists at the given OCD bill ID or jurisdiction + session + bill_id path. `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: -[
      -  "missing_lookup_params",
      -  "not_found",
      -  "upstream_timeout"
      -]New value: +[
      +  "missing_lookup_params",
      +  "invalid_openstates_id",
      +  "not_found",
      +  "upstream_timeout",
      +  "rate_limited"
      +]
  2. Changed8 schema fields changed
    • removedOutput schema / properties / first_action_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / first_action_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / latest_action_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / latest_action_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / latest_action_description / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / latest_action_description / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / latest_passage_date / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / latest_passage_date / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. 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",
      +      "identifier",
      +      "title",
      +      "session",
      +      "jurisdiction",
      +      "from_organization",
      +      "classification",
      +      "subject",
      +      "first_action_date",
      +      "latest_action_date",
      +      "latest_action_description",
      +      "latest_passage_date"
      +    ]
      +  },
      +  {
      +    "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: `missing_lookup_params`: Neither openstates_id nor the complete jurisdiction+session+bill_id triple was provided. `not_found`: Bill does not exist at the given path or OCD ID. `upstream_timeout`: Open States did not answer within the per-request timeout. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "missing_lookup_params",
      +            "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",
      -  "identifier",
      -  "title",
      -  "session",
      -  "jurisdiction",
      -  "from_organization",
      -  "classification",
      -  "subject",
      -  "first_action_date",
      -  "latest_action_date",
      -  "latest_action_description",
      -  "latest_passage_date"
      -]
  4. Changed10 schema fields changed
    • changedOutput schema / properties / abstracts / items / properties / note / description
      Previous value: -"Source note."New value: +"Source note. Empty string when Open States recorded no note."
    • changedOutput schema / properties / actions / items / properties / date / description
      Previous value: -"Action date."New value: +"Action date. Empty string when Open States recorded no date."
    • changedOutput schema / properties / documents / items / properties / date / description
      Previous value: -"Document date."New value: +"Document date. Empty string when Open States recorded no date, which is the usual case for bill documents."
    • changedOutput schema / properties / documents / items / properties / note / description
      Previous value: -"Document note."New value: +"Document note. Empty string when Open States recorded no note."
    • changedOutput schema / properties / other_titles / items / properties / note / description
      Previous value: -"Note describing the alternate title."New value: +"Note describing the alternate title. Empty string when Open States recorded no note."
    • changedOutput schema / properties / sources / items / properties / note / description
      Previous value: -"Source note."New value: +"Source note. Empty string when Open States recorded no note."
    • changedOutput schema / properties / sponsorships / items / properties / person / properties / id / description
      Previous value: -"OCD person ID."New value: +"OCD person ID. Pass it to openstates_search_people as id for the full legislator record, or back to openstates_search_bills as the sponsor filter for their other bills."
    • changedOutput schema / properties / versions / items / properties / date / description
      Previous value: -"Version date."New value: +"Version date. Empty string when Open States recorded no date, which is the usual case for bill versions."
    • changedOutput schema / properties / versions / items / properties / note / description
      Previous value: -"Version note."New value: +"Version note. Empty string when Open States recorded no note."
    • changedOutput schema / properties / votes / items / properties / start_date / description
      Previous value: -"Vote date."New value: +"Vote date. Empty string when Open States recorded no date."
  5. Changed2 schema fields changed
    • changedOutput schema / properties / other_identifiers / items / properties / scheme / description
      Previous value: -"Identifier scheme (the issuing system)."New value: +"Identifier scheme (the issuing system). Absent for bills — Open States omits it on every bill record observed."
    • changedOutput schema / properties / other_identifiers / items / required
      Previous value: -[
      -  "identifier",
      -  "scheme"
      -]New value: +[
      +  "identifier"
      +]
  6. Changed1 schema field changed
    • addedOutput schema / properties / updated_at
      Added value: +{
      +  "description": "Timestamp Open States last updated this record — the field openstates_search_bills sorts by under the default sort=updated_desc.",
      +  "type": "string"
      +}
  7. Changed3 schema fields changed
    • addedOutput schema / properties / other_identifiers
      Added value: +{
      +  "description": "Alternate identifiers when include=other_identifiers is requested.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Alternate identifier record.",
      +    "properties": {
      +      "identifier": {
      +        "description": "Alternate bill identifier.",
      +        "type": "string"
      +      },
      +      "scheme": {
      +        "description": "Identifier scheme (the issuing system).",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "identifier",
      +      "scheme"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / other_titles
      Added value: +{
      +  "description": "Alternate titles when include=other_titles is requested.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Alternate title record.",
      +    "properties": {
      +      "note": {
      +        "description": "Note describing the alternate title.",
      +        "type": "string"
      +      },
      +      "title": {
      +        "description": "Alternate bill title.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "title",
      +      "note"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / sources
      Added value: +{
      +  "description": "Source documents when include=sources is requested.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Source record.",
      +    "properties": {
      +      "note": {
      +        "description": "Source note.",
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "Source URL.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "url",
      +      "note"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  8. 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 readOnly, idempotent, openWorld, so the safety profile is covered; the description adds real context beyond that by explaining the two mutually alternative lookup modes and what inlining via include actually returns. It does not say what happens on a lookup miss or whether include enlarges the payload cost.

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?

Front-loaded with purpose, then lookup modes, then the include tip — logical ordering with no filler. Slightly list-like but every sentence carries actionable information.

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?

With an output schema present, return values needn't be explained, and the description covers both access paths and the include mechanism. The notable gap is that required parameter count is 0, yet the description never states that at least one of the two lookup modes must be supplied — an agent could call it with empty arguments.

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 baseline is 3; the description earns extra by explaining that include=votes yields tally plus per-legislator positions and include=actions yields full history, which goes beyond the schema's short list. It does not clarify the interaction of the two lookup modes with required parameters.

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 and resource ("Fetch full detail for a specific state bill") and immediately distinguishes itself from openstates_search_bills by describing the two lookup keys (three-part path or OCD bill ID). An agent can tell it apart from siblings without opening the schema.

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?

Explicitly advises preferring openstates_id "to avoid session identifier lookup" and using include "rather than searching again," which routes the agent away from redundant search calls. It stops short of naming search_bills by name or stating when-not to use this tool (e.g., for bulk/listing needs).

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.