get_bill

Pack: openstates · Endpoint: https://gateway.pipeworx.io/openstates/mcp

Fetch a single bill with full detail: versions, sponsorships, related/companion bills, actions, and votes. Pass the OpenStates ID (e.g., “ocd-bill/abc…”) or a state/session/identifier triple.

Parameters

NameTypeRequiredDescription
openstates_idstringnoOpenStates bill ID (preferred, e.g., “ocd-bill/…”)
jurisdictionstringnoState code (use with session + identifier)
sessionstringnoSession ID (use with jurisdiction + identifier)
identifierstringnoBill identifier within the session (e.g., “AB-123”)

Example call

Arguments

{
  "openstates_id": "ocd-bill/ca20232024-ab-123"
}

curl

curl -X POST https://gateway.pipeworx.io/openstates/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_bill","arguments":{"openstates_id":"ocd-bill/ca20232024-ab-123"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('get_bill', {
  "openstates_id": "ocd-bill/ca20232024-ab-123"
});

More examples

{
  "jurisdiction": "TX",
  "session": "20232024",
  "identifier": "HB-456"
}

Response shape

FieldTypeDescription
openstates_idstring | nullOpenStates bill ID
identifierstring | nullBill identifier
titlestring | nullBill title
jurisdictionstring | nullState or jurisdiction name
sessionstring | nullLegislative session
classificationarrayBill type classifications
subjectarraySubject tags
chamberstring | nullChamber (upper/lower) or organization
latest_action_datestring | nullDate of latest action
latest_actionstring | nullDescription of latest action
openstates_urlstring | nullLink to OpenStates page
sponsorsarray
versionsarray
actionsarray
votesarray
sourcesarraySource URLs
Full JSON Schema
{
  "type": "object",
  "properties": {
    "openstates_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "OpenStates bill ID"
    },
    "identifier": {
      "type": [
        "string",
        "null"
      ],
      "description": "Bill identifier"
    },
    "title": {
      "type": [
        "string",
        "null"
      ],
      "description": "Bill title"
    },
    "jurisdiction": {
      "type": [
        "string",
        "null"
      ],
      "description": "State or jurisdiction name"
    },
    "session": {
      "type": [
        "string",
        "null"
      ],
      "description": "Legislative session"
    },
    "classification": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Bill type classifications"
    },
    "subject": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Subject tags"
    },
    "chamber": {
      "type": [
        "string",
        "null"
      ],
      "description": "Chamber (upper/lower) or organization"
    },
    "latest_action_date": {
      "type": [
        "string",
        "null"
      ],
      "description": "Date of latest action"
    },
    "latest_action": {
      "type": [
        "string",
        "null"
      ],
      "description": "Description of latest action"
    },
    "openstates_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Link to OpenStates page"
    },
    "sponsors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sponsor name"
          },
          "person_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "OpenStates person ID"
          },
          "classification": {
            "type": [
              "string",
              "null"
            ],
            "description": "Sponsor classification"
          },
          "primary": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Is primary sponsor"
          }
        }
      }
    },
    "versions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Version date"
          },
          "note": {
            "type": [
              "string",
              "null"
            ],
            "description": "Version note"
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Link URL"
                },
                "media_type": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "MIME type"
                }
              }
            }
          }
        }
      }
    },
    "actions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Action date"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Action description"
          },
          "classification": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Action classifications"
          }
        }
      }
    },
    "votes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vote ID"
          },
          "motion": {
            "type": [
              "string",
              "null"
            ],
            "description": "Motion text"
          },
          "start_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vote date"
          },
          "result": {
            "type": [
              "string",
              "null"
            ],
            "description": "Vote result"
          },
          "counts": {
            "type": "array",
            "description": "Vote counts by option"
          }
        }
      }
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Source URLs"
    }
  }
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "openstates": {
      "url": "https://gateway.pipeworx.io/openstates/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build July 6, 2026