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
| Name | Type | Required | Description |
|---|---|---|---|
openstates_id | string | no | OpenStates bill ID (preferred, e.g., “ocd-bill/…”) |
jurisdiction | string | no | State code (use with session + identifier) |
session | string | no | Session ID (use with jurisdiction + identifier) |
identifier | string | no | Bill 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
| Field | Type | Description |
|---|---|---|
openstates_id | string | null | OpenStates bill ID |
identifier | string | null | Bill identifier |
title | string | null | Bill title |
jurisdiction | string | null | State or jurisdiction name |
session | string | null | Legislative session |
classification | array | Bill type classifications |
subject | array | Subject tags |
chamber | string | null | Chamber (upper/lower) or organization |
latest_action_date | string | null | Date of latest action |
latest_action | string | null | Description of latest action |
openstates_url | string | null | Link to OpenStates page |
sponsors | array | |
versions | array | |
actions | array | |
votes | array | |
sources | array | Source 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.