Skip to content

politiclaw_check_upcoming_votes

  • Label: Check upcoming votes + bill changes since last run
  • Group: Monitoring and cadence
  • Source file: packages/politiclaw-plugin/src/tools/monitoring.ts

Description

Surface federal bills and committee events that touch the user's declared stances, so they can see how their reps' agenda lines up — or doesn't — with the values they care about. Fetches recent federal bills and upcoming committee events from api.congress.gov (tier 1), compares each against the persisted snapshot, and returns only items that are new or have materially changed since the last check. Bill changes are scored against declared issue stances when any are set. Output is grouped by triage tier (interruptive / digest / tail). A second invocation on unchanged data returns an empty delta. Requires plugins.entries.politiclaw.config.apiKeys.apiDataGov.

Parameters

NameRequiredTypeDescription
congressnointegerCongress number. Defaults to the 119th (2025-2027).
billTypenostringRestrict bill check to HR, S, HJRES, etc.
fromDateTimenostringISO-8601 lower bound passed to both bills (updateDate) and events (startDateTime).
toDateTimenostringISO-8601 upper bound.
chamberno"House" | "Senate" | "Joint"
limitnointegerMax bills to examine (1-50).
refreshnobooleanWhen true, bypass the 6h bills-list cache and re-fetch from api.congress.gov.

Raw Schema

json
{
  "type": "object",
  "properties": {
    "congress": {
      "minimum": 1,
      "description": "Congress number. Defaults to the 119th (2025-2027).",
      "type": "integer"
    },
    "billType": {
      "description": "Restrict bill check to HR, S, HJRES, etc.",
      "type": "string"
    },
    "fromDateTime": {
      "description": "ISO-8601 lower bound passed to both bills (updateDate) and events (startDateTime).",
      "type": "string"
    },
    "toDateTime": {
      "description": "ISO-8601 upper bound.",
      "type": "string"
    },
    "chamber": {
      "anyOf": [
        {
          "const": "House",
          "type": "string"
        },
        {
          "const": "Senate",
          "type": "string"
        },
        {
          "const": "Joint",
          "type": "string"
        }
      ]
    },
    "limit": {
      "minimum": 1,
      "maximum": 50,
      "description": "Max bills to examine (1-50).",
      "type": "integer"
    },
    "refresh": {
      "description": "When true, bypass the 6h bills-list cache and re-fetch from api.congress.gov.",
      "type": "boolean"
    }
  }
}

Built for people who want local-first political tooling.