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

NameTypeRequiredDescription
person_idstringyesOpenStates 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

FieldTypeDescription
person_idstring | nullOpenStates person ID
namestring | nullFull name
partystring | nullPolitical party
jurisdictionstring | nullState or jurisdiction
chamberstring | nullChamber (upper/lower)
districtstring | nullDistrict identifier
titlestring | nullCurrent title/role
imagestring | nullImage URL
emailstring | nullEmail address
openstates_urlstring | nullLink to OpenStates profile
given_namestring | nullGiven name
family_namestring | nullFamily name
genderstring | nullGender
birth_datestring | nullBirth date
death_datestring | nullDeath date
other_namesarrayAlternative names
officesarray
linksarray
sourcesarraySource 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.

Regenerated from source · build July 6, 2026