get_legislator
Pack: openstates · Endpoint: https://gateway.pipeworx.io/openstates/mcp
Fetch a single legislator by OpenStates person ID. Returns biographical info, current roles, prior offices, contact methods, sources.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
person_id | string | yes | OpenStates person ID (e.g., “ocd-person/…”) |
Example call
Arguments
{
"person_id": "ocd-person/ca-john-doe"
}
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_legislator","arguments":{"person_id":"ocd-person/ca-john-doe"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_legislator', {
"person_id": "ocd-person/ca-john-doe"
});
Response shape
| Field | Type | Description |
|---|---|---|
person_id | string | null | OpenStates person ID |
name | string | null | Full name |
party | string | null | Political party |
jurisdiction | string | null | State or jurisdiction |
chamber | string | null | Chamber (upper/lower) |
district | string | null | District identifier |
title | string | null | Current title/role |
image | string | null | Image URL |
email | string | null | Email address |
openstates_url | string | null | Link to OpenStates profile |
given_name | string | null | Given name |
family_name | string | null | Family name |
gender | string | null | Gender |
birth_date | string | null | Birth date |
death_date | string | null | Death date |
other_names | array | Alternative names |
offices | array | |
links | array | |
sources | array | Source URLs |
Full JSON Schema
{
"type": "object",
"properties": {
"person_id": {
"type": [
"string",
"null"
],
"description": "OpenStates person ID"
},
"name": {
"type": [
"string",
"null"
],
"description": "Full name"
},
"party": {
"type": [
"string",
"null"
],
"description": "Political party"
},
"jurisdiction": {
"type": [
"string",
"null"
],
"description": "State or jurisdiction"
},
"chamber": {
"type": [
"string",
"null"
],
"description": "Chamber (upper/lower)"
},
"district": {
"type": [
"string",
"null"
],
"description": "District identifier"
},
"title": {
"type": [
"string",
"null"
],
"description": "Current title/role"
},
"image": {
"type": [
"string",
"null"
],
"description": "Image URL"
},
"email": {
"type": [
"string",
"null"
],
"description": "Email address"
},
"openstates_url": {
"type": [
"string",
"null"
],
"description": "Link to OpenStates profile"
},
"given_name": {
"type": [
"string",
"null"
],
"description": "Given name"
},
"family_name": {
"type": [
"string",
"null"
],
"description": "Family name"
},
"gender": {
"type": [
"string",
"null"
],
"description": "Gender"
},
"birth_date": {
"type": [
"string",
"null"
],
"description": "Birth date"
},
"death_date": {
"type": [
"string",
"null"
],
"description": "Death date"
},
"other_names": {
"type": "array",
"items": {
"type": "string"
},
"description": "Alternative names"
},
"offices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": [
"string",
"null"
],
"description": "Office name"
},
"classification": {
"type": [
"string",
"null"
],
"description": "Office classification"
},
"address": {
"type": [
"string",
"null"
],
"description": "Office address"
},
"voice": {
"type": [
"string",
"null"
],
"description": "Phone number"
},
"email": {
"type": [
"string",
"null"
],
"description": "Office email"
}
}
}
},
"links": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": [
"string",
"null"
],
"description": "Link URL"
},
"note": {
"type": [
"string",
"null"
],
"description": "Link note/description"
}
}
}
},
"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.