openstates-mcp-server 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +397 -0
- package/Dockerfile +99 -0
- package/LICENSE +201 -0
- package/README.md +324 -0
- package/changelog/0.1.x/0.1.0.md +23 -0
- package/changelog/0.1.x/0.1.1.md +29 -0
- package/changelog/template.md +119 -0
- package/dist/config/server-config.d.ts +13 -0
- package/dist/config/server-config.d.ts.map +1 -0
- package/dist/config/server-config.js +19 -0
- package/dist/config/server-config.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +50 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/bill-research.prompt.d.ts +11 -0
- package/dist/mcp-server/prompts/definitions/bill-research.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/bill-research.prompt.js +65 -0
- package/dist/mcp-server/prompts/definitions/bill-research.prompt.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/legislator-profile.prompt.d.ts +10 -0
- package/dist/mcp-server/prompts/definitions/legislator-profile.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/legislator-profile.prompt.js +55 -0
- package/dist/mcp-server/prompts/definitions/legislator-profile.prompt.js.map +1 -0
- package/dist/mcp-server/resources/definitions/jurisdiction.resource.d.ts +9 -0
- package/dist/mcp-server/resources/definitions/jurisdiction.resource.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/jurisdiction.resource.js +60 -0
- package/dist/mcp-server/resources/definitions/jurisdiction.resource.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-bill.tool.d.ts +121 -0
- package/dist/mcp-server/tools/definitions/get-bill.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-bill.tool.js +319 -0
- package/dist/mcp-server/tools/definitions/get-bill.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-committee.tool.d.ts +30 -0
- package/dist/mcp-server/tools/definitions/get-committee.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-committee.tool.js +89 -0
- package/dist/mcp-server/tools/definitions/get-committee.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-event.tool.d.ts +65 -0
- package/dist/mcp-server/tools/definitions/get-event.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-event.tool.js +231 -0
- package/dist/mcp-server/tools/definitions/get-event.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-jurisdiction.tool.d.ts +34 -0
- package/dist/mcp-server/tools/definitions/get-jurisdiction.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-jurisdiction.tool.js +99 -0
- package/dist/mcp-server/tools/definitions/get-jurisdiction.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-legislators-by-location.tool.d.ts +53 -0
- package/dist/mcp-server/tools/definitions/get-legislators-by-location.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-legislators-by-location.tool.js +156 -0
- package/dist/mcp-server/tools/definitions/get-legislators-by-location.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/list-jurisdictions.tool.d.ts +42 -0
- package/dist/mcp-server/tools/definitions/list-jurisdictions.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/list-jurisdictions.tool.js +110 -0
- package/dist/mcp-server/tools/definitions/list-jurisdictions.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-bills.tool.d.ts +102 -0
- package/dist/mcp-server/tools/definitions/search-bills.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-bills.tool.js +285 -0
- package/dist/mcp-server/tools/definitions/search-bills.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-committees.tool.d.ts +44 -0
- package/dist/mcp-server/tools/definitions/search-committees.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-committees.tool.js +127 -0
- package/dist/mcp-server/tools/definitions/search-committees.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-events.tool.d.ts +62 -0
- package/dist/mcp-server/tools/definitions/search-events.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-events.tool.js +198 -0
- package/dist/mcp-server/tools/definitions/search-events.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-people.tool.d.ts +64 -0
- package/dist/mcp-server/tools/definitions/search-people.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-people.tool.js +193 -0
- package/dist/mcp-server/tools/definitions/search-people.tool.js.map +1 -0
- package/dist/services/openstates/openstates-service.d.ts +30 -0
- package/dist/services/openstates/openstates-service.d.ts.map +1 -0
- package/dist/services/openstates/openstates-service.js +246 -0
- package/dist/services/openstates/openstates-service.js.map +1 -0
- package/dist/services/openstates/types.d.ts +324 -0
- package/dist/services/openstates/types.d.ts.map +1 -0
- package/dist/services/openstates/types.js +6 -0
- package/dist/services/openstates/types.js.map +1 -0
- package/package.json +90 -0
- package/server.json +99 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
# FORMAT REFERENCE — do not edit. Copy this file to
|
|
3
|
+
# `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.8.x/0.8.6.md`)
|
|
4
|
+
# to author a new release. Set that file's H1 to `# <version> — YYYY-MM-DD`
|
|
5
|
+
# with a concrete date.
|
|
6
|
+
|
|
7
|
+
# Required. One-line GitHub Release-style headline. 350 character cap.
|
|
8
|
+
# Default short and scannable. Don't pad, don't stitch unrelated changes with
|
|
9
|
+
# semicolons — pick the headline. Quotes required: unquoted YAML treats `: `
|
|
10
|
+
# inside the value as a key separator and fails GitHub's strict parser.
|
|
11
|
+
summary: ""
|
|
12
|
+
|
|
13
|
+
# Set `true` when consumers must change code to upgrade: API removals,
|
|
14
|
+
# signature changes, config renames, behavior changes that break existing
|
|
15
|
+
# usage. Flagged as `Breaking` in the rollup.
|
|
16
|
+
breaking: false
|
|
17
|
+
|
|
18
|
+
# Set `true` if this release contains any security fix. Pairs with the
|
|
19
|
+
# `## Security` section below. Flagged as `Security` in the rollup so
|
|
20
|
+
# users can triage upgrade urgency at a glance.
|
|
21
|
+
security: false
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# <version> — YYYY-MM-DD
|
|
25
|
+
|
|
26
|
+
<!--
|
|
27
|
+
AUTHORING GUIDE — applies to the new per-version file you create from this
|
|
28
|
+
template.
|
|
29
|
+
|
|
30
|
+
Audience: someone scanning release notes to decide what affects them. Lead
|
|
31
|
+
each bullet with the symbol or concept name in **bold** so they can skip
|
|
32
|
+
what's irrelevant and zoom in on what's not.
|
|
33
|
+
|
|
34
|
+
Tone: terse, fact-dense, not verbose. Default to one sentence per bullet —
|
|
35
|
+
name the symbol, state what changed, stop. Use a second sentence only when
|
|
36
|
+
it carries weight. If a bullet feels long, it is.
|
|
37
|
+
|
|
38
|
+
Cut: mechanism walkthroughs (those belong in JSDoc, AGENTS.md, or the
|
|
39
|
+
relevant skill), ceremonial framings ("This release introduces…",
|
|
40
|
+
backwards-compat paragraphs), file-by-file test enumerations, internal
|
|
41
|
+
implementation notes. Prefer code/symbol names over English re-explanations.
|
|
42
|
+
|
|
43
|
+
Narrative intro: skip by default. Add one short sentence only when the
|
|
44
|
+
release theme genuinely needs framing the bullets can't carry.
|
|
45
|
+
|
|
46
|
+
Sections: Keep a Changelog order — Added, Changed, Deprecated, Removed,
|
|
47
|
+
Fixed, Security. Include only sections with entries; delete the rest
|
|
48
|
+
(including the commented-out scaffolding below). Don't ship empty headers.
|
|
49
|
+
|
|
50
|
+
Include: every distinct fact a reader needs to adopt or audit the release —
|
|
51
|
+
new exports, signatures, lint rule IDs, env vars, breaking changes, version
|
|
52
|
+
bumps on shipped skills. Nothing more.
|
|
53
|
+
|
|
54
|
+
Links: link issues, PRs, docs, or skills where they help a reader jump to
|
|
55
|
+
context. Once per item per entry — don't re-link the same issue in summary,
|
|
56
|
+
narrative, and bullet. Skip links for inline symbol names; code spans speak
|
|
57
|
+
for themselves.
|
|
58
|
+
|
|
59
|
+
Issue/PR URLs: use full URLs. GitHub's bare `#NN` auto-link only resolves
|
|
60
|
+
inside its own UI, not in npm reads or local editors.
|
|
61
|
+
|
|
62
|
+
[#38](https://github.com/cyanheads/mcp-ts-core/issues/38) ← issue
|
|
63
|
+
[#42](https://github.com/cyanheads/mcp-ts-core/pull/42) ← PR
|
|
64
|
+
|
|
65
|
+
Verify numbers exist before linking (`gh issue view NN`, `gh pr view NN`).
|
|
66
|
+
Never speculate on a future number — `#42` for an upcoming PR silently
|
|
67
|
+
resolves to whatever real item already owns 42, and timeline previews pull
|
|
68
|
+
in that unrelated item's metadata.
|
|
69
|
+
|
|
70
|
+
TAG ANNOTATIONS — the annotated tag body renders as the GitHub Release body
|
|
71
|
+
via `gh release create --notes-from-tag`. The tag is a derivative of this
|
|
72
|
+
changelog entry — a condensed, scannable version, not a copy. Format:
|
|
73
|
+
|
|
74
|
+
<theme — omit version number, GitHub prepends it>
|
|
75
|
+
← blank line
|
|
76
|
+
<1-2 sentence context: what this release does>
|
|
77
|
+
← blank line
|
|
78
|
+
Dependency bumps: ← section header
|
|
79
|
+
← blank line
|
|
80
|
+
- `@cyanheads/mcp-ts-core` ^0.9.1 → ^0.9.6 ← bullet
|
|
81
|
+
← blank line
|
|
82
|
+
Changed: ← only sections with entries
|
|
83
|
+
← blank line
|
|
84
|
+
- `format()` output includes `query` in text mode
|
|
85
|
+
← blank line
|
|
86
|
+
Added:
|
|
87
|
+
← blank line
|
|
88
|
+
- `manifest.json` scaffolded for MCPB bundle support
|
|
89
|
+
- Install badges (Claude Desktop, Cursor, VS Code)
|
|
90
|
+
← blank line
|
|
91
|
+
<N> tests pass; `bun run devcheck` clean. ← footer
|
|
92
|
+
|
|
93
|
+
Never a flat comma-separated string. Always structured markdown with
|
|
94
|
+
sections. The tag must scan well as a rendered GitHub Release page.
|
|
95
|
+
-->
|
|
96
|
+
|
|
97
|
+
## Added
|
|
98
|
+
|
|
99
|
+
-
|
|
100
|
+
|
|
101
|
+
## Changed
|
|
102
|
+
|
|
103
|
+
-
|
|
104
|
+
|
|
105
|
+
<!-- ## Deprecated
|
|
106
|
+
|
|
107
|
+
- -->
|
|
108
|
+
|
|
109
|
+
<!-- ## Removed
|
|
110
|
+
|
|
111
|
+
- -->
|
|
112
|
+
|
|
113
|
+
## Fixed
|
|
114
|
+
|
|
115
|
+
-
|
|
116
|
+
|
|
117
|
+
<!-- ## Security
|
|
118
|
+
|
|
119
|
+
- -->
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Server-specific configuration for openstates-mcp-server.
|
|
3
|
+
* @module config/server-config
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
declare const ServerConfigSchema: z.ZodObject<{
|
|
7
|
+
apiKey: z.ZodString;
|
|
8
|
+
apiBaseUrl: z.ZodDefault<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type ServerConfig = z.infer<typeof ServerConfigSchema>;
|
|
11
|
+
export declare function getServerConfig(): ServerConfig;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=server-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB;;;iBAGtB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAI9D,wBAAgB,eAAe,IAAI,YAAY,CAM9C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Server-specific configuration for openstates-mcp-server.
|
|
3
|
+
* @module config/server-config
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
|
|
7
|
+
const ServerConfigSchema = z.object({
|
|
8
|
+
apiKey: z.string().min(1).describe('Open States API key from open.pluralpolicy.com'),
|
|
9
|
+
apiBaseUrl: z.string().default('https://v3.openstates.org').describe('Open States API base URL'),
|
|
10
|
+
});
|
|
11
|
+
let _config;
|
|
12
|
+
export function getServerConfig() {
|
|
13
|
+
_config ??= parseEnvConfig(ServerConfigSchema, {
|
|
14
|
+
apiKey: 'OPENSTATES_API_KEY',
|
|
15
|
+
apiBaseUrl: 'OPENSTATES_API_BASE_URL',
|
|
16
|
+
});
|
|
17
|
+
return _config;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=server-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,gDAAgD,CAAC;IACpF,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC,QAAQ,CAAC,0BAA0B,CAAC;CACjG,CAAC,CAAC;AAIH,IAAI,OAAiC,CAAC;AAEtC,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,cAAc,CAAC,kBAAkB,EAAE;QAC7C,MAAM,EAAE,oBAAoB;QAC5B,UAAU,EAAE,yBAAyB;KACtC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview openstates-mcp-server MCP server entry point.
|
|
4
|
+
* @module index
|
|
5
|
+
*/
|
|
6
|
+
import { createApp } from '@cyanheads/mcp-ts-core';
|
|
7
|
+
import { getServerConfig } from './config/server-config.js';
|
|
8
|
+
// Prompts
|
|
9
|
+
import { billResearch } from './mcp-server/prompts/definitions/bill-research.prompt.js';
|
|
10
|
+
import { legislatorProfile } from './mcp-server/prompts/definitions/legislator-profile.prompt.js';
|
|
11
|
+
// Resources
|
|
12
|
+
import { jurisdictionResource } from './mcp-server/resources/definitions/jurisdiction.resource.js';
|
|
13
|
+
// Tools
|
|
14
|
+
import { getBill } from './mcp-server/tools/definitions/get-bill.tool.js';
|
|
15
|
+
import { getCommittee } from './mcp-server/tools/definitions/get-committee.tool.js';
|
|
16
|
+
import { getEvent } from './mcp-server/tools/definitions/get-event.tool.js';
|
|
17
|
+
import { getJurisdiction } from './mcp-server/tools/definitions/get-jurisdiction.tool.js';
|
|
18
|
+
import { getLegislatorsByLocation } from './mcp-server/tools/definitions/get-legislators-by-location.tool.js';
|
|
19
|
+
import { listJurisdictions } from './mcp-server/tools/definitions/list-jurisdictions.tool.js';
|
|
20
|
+
import { searchBills } from './mcp-server/tools/definitions/search-bills.tool.js';
|
|
21
|
+
import { searchCommittees } from './mcp-server/tools/definitions/search-committees.tool.js';
|
|
22
|
+
import { searchEvents } from './mcp-server/tools/definitions/search-events.tool.js';
|
|
23
|
+
import { searchPeople } from './mcp-server/tools/definitions/search-people.tool.js';
|
|
24
|
+
import { initOpenStatesApiService } from './services/openstates/openstates-service.js';
|
|
25
|
+
await createApp({
|
|
26
|
+
tools: [
|
|
27
|
+
searchBills,
|
|
28
|
+
getBill,
|
|
29
|
+
searchPeople,
|
|
30
|
+
getLegislatorsByLocation,
|
|
31
|
+
searchCommittees,
|
|
32
|
+
getCommittee,
|
|
33
|
+
searchEvents,
|
|
34
|
+
getEvent,
|
|
35
|
+
listJurisdictions,
|
|
36
|
+
getJurisdiction,
|
|
37
|
+
],
|
|
38
|
+
resources: [jurisdictionResource],
|
|
39
|
+
prompts: [billResearch, legislatorProfile],
|
|
40
|
+
instructions: 'Open States MCP server — US state legislative data for all 50 states, DC, and Puerto Rico.\n' +
|
|
41
|
+
'- Use openstates_list_jurisdictions or openstates_get_jurisdiction (include=legislative_sessions) to discover valid session identifiers before filtering bill searches.\n' +
|
|
42
|
+
'- Either jurisdiction or q is required for openstates_search_bills.\n' +
|
|
43
|
+
'- Committee and event tools are experimental — not all states have coverage.\n' +
|
|
44
|
+
'- Use include parameter on search and get tools to request related data inline and avoid N+1 follow-up calls.',
|
|
45
|
+
setup(core) {
|
|
46
|
+
const serverConfig = getServerConfig();
|
|
47
|
+
initOpenStatesApiService(core.config, core.storage, serverConfig);
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,UAAU;AACV,OAAO,EAAE,YAAY,EAAE,MAAM,0DAA0D,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+DAA+D,CAAC;AAClG,YAAY;AACZ,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAC;AACnG,QAAQ;AACR,OAAO,EAAE,OAAO,EAAE,MAAM,iDAAiD,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,sDAAsD,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,kDAAkD,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,yDAAyD,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,oEAAoE,CAAC;AAC9G,OAAO,EAAE,iBAAiB,EAAE,MAAM,2DAA2D,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,0DAA0D,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,sDAAsD,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,sDAAsD,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAEvF,MAAM,SAAS,CAAC;IACd,KAAK,EAAE;QACL,WAAW;QACX,OAAO;QACP,YAAY;QACZ,wBAAwB;QACxB,gBAAgB;QAChB,YAAY;QACZ,YAAY;QACZ,QAAQ;QACR,iBAAiB;QACjB,eAAe;KAChB;IACD,SAAS,EAAE,CAAC,oBAAoB,CAAC;IACjC,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;IAC1C,YAAY,EACV,8FAA8F;QAC9F,2KAA2K;QAC3K,uEAAuE;QACvE,gFAAgF;QAChF,+GAA+G;IACjH,KAAK,CAAC,IAAI;QACR,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;QACvC,wBAAwB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IACpE,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Structured framework for analyzing a state bill.
|
|
3
|
+
* @module mcp-server/prompts/definitions/bill-research
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
export declare const billResearch: import("@cyanheads/mcp-ts-core").PromptDefinition<z.ZodObject<{
|
|
7
|
+
jurisdiction: z.ZodString;
|
|
8
|
+
session: z.ZodString;
|
|
9
|
+
bill_id: z.ZodString;
|
|
10
|
+
}, z.core.$strip>>;
|
|
11
|
+
//# sourceMappingURL=bill-research.prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bill-research.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/bill-research.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,YAAY;;;;kBA6DvB,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Structured framework for analyzing a state bill.
|
|
3
|
+
* @module mcp-server/prompts/definitions/bill-research
|
|
4
|
+
*/
|
|
5
|
+
import { prompt, z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
export const billResearch = prompt('openstates_bill_research', {
|
|
7
|
+
description: 'Structured framework for analyzing a state bill: summary, sponsors, committee referrals, action timeline, vote record, and related legislation. Produces a comprehensive research brief.',
|
|
8
|
+
args: z.object({
|
|
9
|
+
jurisdiction: z
|
|
10
|
+
.string()
|
|
11
|
+
.describe('State name, abbreviation, or OCD-ID (e.g., "Washington", "wa").'),
|
|
12
|
+
session: z
|
|
13
|
+
.string()
|
|
14
|
+
.describe('Session identifier (e.g., "2025", "2025rs"). Use openstates_get_jurisdiction to confirm.'),
|
|
15
|
+
bill_id: z
|
|
16
|
+
.string()
|
|
17
|
+
.describe('Bill identifier as used by the legislature (e.g., "HB 1000", "SB 42").'),
|
|
18
|
+
}),
|
|
19
|
+
generate: (args) => [
|
|
20
|
+
{
|
|
21
|
+
role: 'user',
|
|
22
|
+
content: {
|
|
23
|
+
type: 'text',
|
|
24
|
+
text: [
|
|
25
|
+
`Research the following state bill and produce a comprehensive analysis brief:`,
|
|
26
|
+
``,
|
|
27
|
+
`**Jurisdiction:** ${args.jurisdiction}`,
|
|
28
|
+
`**Session:** ${args.session}`,
|
|
29
|
+
`**Bill ID:** ${args.bill_id}`,
|
|
30
|
+
``,
|
|
31
|
+
`Use the openstates tools to gather the following information and structure your response:`,
|
|
32
|
+
``,
|
|
33
|
+
`1. **Bill Overview** — Fetch full bill detail with include=sponsorships,actions,votes,abstracts,versions`,
|
|
34
|
+
` - Title and official identifier`,
|
|
35
|
+
` - Plain-language summary (from abstracts if available, otherwise synthesize from title and actions)`,
|
|
36
|
+
` - Bill classification and subject tags`,
|
|
37
|
+
``,
|
|
38
|
+
`2. **Sponsors** — Primary and co-sponsors with party affiliation`,
|
|
39
|
+
` - Use openstates_search_people to look up sponsor profiles if needed`,
|
|
40
|
+
``,
|
|
41
|
+
`3. **Legislative History** — Chronological action timeline`,
|
|
42
|
+
` - Introduction date and originating chamber`,
|
|
43
|
+
` - Committee referrals`,
|
|
44
|
+
` - Hearings and amendments`,
|
|
45
|
+
` - Chamber passage dates`,
|
|
46
|
+
` - Current status`,
|
|
47
|
+
``,
|
|
48
|
+
`4. **Vote Record** — If votes are available:`,
|
|
49
|
+
` - Motion, result, and tally (yes/no/absent counts)`,
|
|
50
|
+
` - Notable yea/nay positions`,
|
|
51
|
+
``,
|
|
52
|
+
`5. **Related Legislation** — Companion bills, identical bills, or related measures`,
|
|
53
|
+
``,
|
|
54
|
+
`6. **Bill Text** — Links to the latest enrolled or introduced version`,
|
|
55
|
+
``,
|
|
56
|
+
`7. **Assessment** — Based on action history and vote record:`,
|
|
57
|
+
` - Current probability of passage`,
|
|
58
|
+
` - Key obstacles or supporters`,
|
|
59
|
+
` - Expected next steps`,
|
|
60
|
+
].join('\n'),
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=bill-research.prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bill-research.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/bill-research.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,0BAA0B,EAAE;IAC7D,WAAW,EACT,0LAA0L;IAC5L,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,YAAY,EAAE,CAAC;aACZ,MAAM,EAAE;aACR,QAAQ,CAAC,iEAAiE,CAAC;QAC9E,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,CACP,0FAA0F,CAC3F;QACH,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,CAAC,wEAAwE,CAAC;KACtF,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QAClB;YACE,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE;oBACJ,+EAA+E;oBAC/E,EAAE;oBACF,qBAAqB,IAAI,CAAC,YAAY,EAAE;oBACxC,gBAAgB,IAAI,CAAC,OAAO,EAAE;oBAC9B,gBAAgB,IAAI,CAAC,OAAO,EAAE;oBAC9B,EAAE;oBACF,2FAA2F;oBAC3F,EAAE;oBACF,0GAA0G;oBAC1G,oCAAoC;oBACpC,wGAAwG;oBACxG,2CAA2C;oBAC3C,EAAE;oBACF,kEAAkE;oBAClE,yEAAyE;oBACzE,EAAE;oBACF,4DAA4D;oBAC5D,gDAAgD;oBAChD,0BAA0B;oBAC1B,8BAA8B;oBAC9B,4BAA4B;oBAC5B,qBAAqB;oBACrB,EAAE;oBACF,8CAA8C;oBAC9C,uDAAuD;oBACvD,gCAAgC;oBAChC,EAAE;oBACF,oFAAoF;oBACpF,EAAE;oBACF,uEAAuE;oBACvE,EAAE;oBACF,8DAA8D;oBAC9D,qCAAqC;oBACrC,kCAAkC;oBAClC,0BAA0B;iBAC3B,CAAC,IAAI,CAAC,IAAI,CAAC;aACb;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Research framework for profiling a state legislator.
|
|
3
|
+
* @module mcp-server/prompts/definitions/legislator-profile
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
export declare const legislatorProfile: import("@cyanheads/mcp-ts-core").PromptDefinition<z.ZodObject<{
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
jurisdiction: z.ZodString;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
//# sourceMappingURL=legislator-profile.prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legislator-profile.prompt.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/legislator-profile.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAU,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,eAAO,MAAM,iBAAiB;;;kBAiD5B,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Research framework for profiling a state legislator.
|
|
3
|
+
* @module mcp-server/prompts/definitions/legislator-profile
|
|
4
|
+
*/
|
|
5
|
+
import { prompt, z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
export const legislatorProfile = prompt('openstates_legislator_profile', {
|
|
7
|
+
description: 'Research framework for profiling a legislator: sponsored bills, committee assignments, voting record, and contact details. Produces a structured profile for constituent research, advocacy, or journalistic purposes.',
|
|
8
|
+
args: z.object({
|
|
9
|
+
name: z.string().describe('Legislator name or partial name (e.g., "Smith", "Jane Smith").'),
|
|
10
|
+
jurisdiction: z
|
|
11
|
+
.string()
|
|
12
|
+
.describe('State name, abbreviation, or OCD-ID (e.g., "Washington", "wa").'),
|
|
13
|
+
}),
|
|
14
|
+
generate: (args) => [
|
|
15
|
+
{
|
|
16
|
+
role: 'user',
|
|
17
|
+
content: {
|
|
18
|
+
type: 'text',
|
|
19
|
+
text: [
|
|
20
|
+
`Research and profile the following state legislator:`,
|
|
21
|
+
``,
|
|
22
|
+
`**Name:** ${args.name}`,
|
|
23
|
+
`**Jurisdiction:** ${args.jurisdiction}`,
|
|
24
|
+
``,
|
|
25
|
+
`Use the openstates tools to gather the following and produce a structured profile:`,
|
|
26
|
+
``,
|
|
27
|
+
`1. **Identity & Role** — Use openstates_search_people (name + jurisdiction, include=offices,links)`,
|
|
28
|
+
` - Full name, party, chamber, district`,
|
|
29
|
+
` - Contact information (phone, office address, email)`,
|
|
30
|
+
` - Website and social media links`,
|
|
31
|
+
``,
|
|
32
|
+
`2. **Sponsored Legislation** — Use openstates_search_bills (jurisdiction + sponsor=name)`,
|
|
33
|
+
` - Bills sponsored in the current session`,
|
|
34
|
+
` - Primary vs. co-sponsorships`,
|
|
35
|
+
` - Key subject areas and recurring themes`,
|
|
36
|
+
``,
|
|
37
|
+
`3. **Committee Assignments** — Use openstates_search_committees (jurisdiction, include=memberships)`,
|
|
38
|
+
` - Look for their name in membership rosters`,
|
|
39
|
+
` - Note chair/ranking member positions when applicable`,
|
|
40
|
+
` - Note: committee data is experimental and may not be available for all states`,
|
|
41
|
+
``,
|
|
42
|
+
`4. **Voting Record** — Use openstates_search_bills to find notable bills in their jurisdiction, then openstates_get_bill with include=votes`,
|
|
43
|
+
` - Voting patterns on major legislation`,
|
|
44
|
+
` - Party-line vs. cross-aisle votes`,
|
|
45
|
+
``,
|
|
46
|
+
`5. **Profile Summary** — Synthesize into a brief profile covering:`,
|
|
47
|
+
` - Legislative priorities based on sponsored bills`,
|
|
48
|
+
` - Policy positions inferred from voting record`,
|
|
49
|
+
` - Key constituent services information`,
|
|
50
|
+
].join('\n'),
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=legislator-profile.prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legislator-profile.prompt.js","sourceRoot":"","sources":["../../../../src/mcp-server/prompts/definitions/legislator-profile.prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,+BAA+B,EAAE;IACvE,WAAW,EACT,wNAAwN;IAC1N,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gEAAgE,CAAC;QAC3F,YAAY,EAAE,CAAC;aACZ,MAAM,EAAE;aACR,QAAQ,CAAC,iEAAiE,CAAC;KAC/E,CAAC;IACF,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;QAClB;YACE,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE;oBACJ,sDAAsD;oBACtD,EAAE;oBACF,aAAa,IAAI,CAAC,IAAI,EAAE;oBACxB,qBAAqB,IAAI,CAAC,YAAY,EAAE;oBACxC,EAAE;oBACF,oFAAoF;oBACpF,EAAE;oBACF,oGAAoG;oBACpG,0CAA0C;oBAC1C,yDAAyD;oBACzD,qCAAqC;oBACrC,EAAE;oBACF,0FAA0F;oBAC1F,6CAA6C;oBAC7C,kCAAkC;oBAClC,6CAA6C;oBAC7C,EAAE;oBACF,qGAAqG;oBACrG,gDAAgD;oBAChD,0DAA0D;oBAC1D,mFAAmF;oBACnF,EAAE;oBACF,6IAA6I;oBAC7I,2CAA2C;oBAC3C,uCAAuC;oBACvC,EAAE;oBACF,oEAAoE;oBACpE,sDAAsD;oBACtD,mDAAmD;oBACnD,2CAA2C;iBAC5C,CAAC,IAAI,CAAC,IAAI,CAAC;aACb;SACF;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Jurisdiction metadata resource — stable reference context for session identifiers and coverage dates.
|
|
3
|
+
* @module mcp-server/resources/definitions/jurisdiction
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
export declare const jurisdictionResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<z.ZodObject<{
|
|
7
|
+
jurisdiction_id: z.ZodString;
|
|
8
|
+
}, z.core.$strip>, undefined, undefined>;
|
|
9
|
+
//# sourceMappingURL=jurisdiction.resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jurisdiction.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/jurisdiction.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAIrD,eAAO,MAAM,oBAAoB;;wCA4D/B,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Jurisdiction metadata resource — stable reference context for session identifiers and coverage dates.
|
|
3
|
+
* @module mcp-server/resources/definitions/jurisdiction
|
|
4
|
+
*/
|
|
5
|
+
import { resource, z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { notFound } from '@cyanheads/mcp-ts-core/errors';
|
|
7
|
+
import { getOpenStatesApiService } from '../../../services/openstates/openstates-service.js';
|
|
8
|
+
export const jurisdictionResource = resource('openstates://jurisdiction/{jurisdiction_id}', {
|
|
9
|
+
title: 'Jurisdiction Metadata',
|
|
10
|
+
description: 'Jurisdiction metadata including current sessions, coverage dates, and bill/people update timestamps. Use as stable reference context before querying bills or people — inject this to prime session identifiers without a tool call.',
|
|
11
|
+
mimeType: 'application/json',
|
|
12
|
+
params: z.object({
|
|
13
|
+
jurisdiction_id: z
|
|
14
|
+
.string()
|
|
15
|
+
.describe('OCD jurisdiction ID, state name (e.g., "Washington"), or two-letter abbreviation (e.g., "wa").'),
|
|
16
|
+
}),
|
|
17
|
+
async handler(params, ctx) {
|
|
18
|
+
const svc = getOpenStatesApiService();
|
|
19
|
+
const jurisdiction = await svc.getJurisdiction(params.jurisdiction_id, ['legislative_sessions'], ctx);
|
|
20
|
+
if (!jurisdiction) {
|
|
21
|
+
throw notFound(`Jurisdiction not found: ${params.jurisdiction_id}`, {
|
|
22
|
+
jurisdiction_id: params.jurisdiction_id,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
ctx.log.debug('Fetched jurisdiction resource', {
|
|
26
|
+
id: jurisdiction.id,
|
|
27
|
+
name: jurisdiction.name,
|
|
28
|
+
});
|
|
29
|
+
return jurisdiction;
|
|
30
|
+
},
|
|
31
|
+
list: async () => ({
|
|
32
|
+
resources: [
|
|
33
|
+
{
|
|
34
|
+
uri: 'openstates://jurisdiction/wa',
|
|
35
|
+
name: 'Washington',
|
|
36
|
+
description: 'Washington State jurisdiction metadata',
|
|
37
|
+
mimeType: 'application/json',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
uri: 'openstates://jurisdiction/ca',
|
|
41
|
+
name: 'California',
|
|
42
|
+
description: 'California jurisdiction metadata',
|
|
43
|
+
mimeType: 'application/json',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
uri: 'openstates://jurisdiction/ny',
|
|
47
|
+
name: 'New York',
|
|
48
|
+
description: 'New York jurisdiction metadata',
|
|
49
|
+
mimeType: 'application/json',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
uri: 'openstates://jurisdiction/tx',
|
|
53
|
+
name: 'Texas',
|
|
54
|
+
description: 'Texas jurisdiction metadata',
|
|
55
|
+
mimeType: 'application/json',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
}),
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=jurisdiction.resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jurisdiction.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/jurisdiction.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAEtF,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,6CAA6C,EAAE;IAC1F,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,sOAAsO;IACxO,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,eAAe,EAAE,CAAC;aACf,MAAM,EAAE;aACR,QAAQ,CACP,gGAAgG,CACjG;KACJ,CAAC;IAEF,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,MAAM,GAAG,GAAG,uBAAuB,EAAE,CAAC;QACtC,MAAM,YAAY,GAAG,MAAM,GAAG,CAAC,eAAe,CAC5C,MAAM,CAAC,eAAe,EACtB,CAAC,sBAAsB,CAAC,EACxB,GAAG,CACJ,CAAC;QACF,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,QAAQ,CAAC,2BAA2B,MAAM,CAAC,eAAe,EAAE,EAAE;gBAClE,eAAe,EAAE,MAAM,CAAC,eAAe;aACxC,CAAC,CAAC;QACL,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,+BAA+B,EAAE;YAC7C,EAAE,EAAE,YAAY,CAAC,EAAE;YACnB,IAAI,EAAE,YAAY,CAAC,IAAI;SACxB,CAAC,CAAC;QACH,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACjB,SAAS,EAAE;YACT;gBACE,GAAG,EAAE,8BAA8B;gBACnC,IAAI,EAAE,YAAY;gBAClB,WAAW,EAAE,wCAAwC;gBACrD,QAAQ,EAAE,kBAAkB;aAC7B;YACD;gBACE,GAAG,EAAE,8BAA8B;gBACnC,IAAI,EAAE,YAAY;gBAClB,WAAW,EAAE,kCAAkC;gBAC/C,QAAQ,EAAE,kBAAkB;aAC7B;YACD;gBACE,GAAG,EAAE,8BAA8B;gBACnC,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,gCAAgC;gBAC7C,QAAQ,EAAE,kBAAkB;aAC7B;YACD;gBACE,GAAG,EAAE,8BAA8B;gBACnC,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,6BAA6B;gBAC1C,QAAQ,EAAE,kBAAkB;aAC7B;SACF;KACF,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Fetch full detail for a specific state bill.
|
|
3
|
+
* @module mcp-server/tools/definitions/get-bill
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
|
+
export declare const getBill: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
8
|
+
openstates_id: z.ZodOptional<z.ZodString>;
|
|
9
|
+
jurisdiction: z.ZodOptional<z.ZodString>;
|
|
10
|
+
session: z.ZodOptional<z.ZodString>;
|
|
11
|
+
bill_id: z.ZodOptional<z.ZodString>;
|
|
12
|
+
include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
13
|
+
sponsorships: "sponsorships";
|
|
14
|
+
abstracts: "abstracts";
|
|
15
|
+
other_titles: "other_titles";
|
|
16
|
+
other_identifiers: "other_identifiers";
|
|
17
|
+
actions: "actions";
|
|
18
|
+
sources: "sources";
|
|
19
|
+
documents: "documents";
|
|
20
|
+
versions: "versions";
|
|
21
|
+
votes: "votes";
|
|
22
|
+
related_bills: "related_bills";
|
|
23
|
+
}>>>;
|
|
24
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
identifier: z.ZodString;
|
|
27
|
+
title: z.ZodString;
|
|
28
|
+
session: z.ZodString;
|
|
29
|
+
jurisdiction: z.ZodObject<{
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
name: z.ZodString;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
from_organization: z.ZodObject<{
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
classification: z.ZodString;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
classification: z.ZodArray<z.ZodString>;
|
|
38
|
+
subject: z.ZodArray<z.ZodString>;
|
|
39
|
+
first_action_date: z.ZodNullable<z.ZodString>;
|
|
40
|
+
latest_action_date: z.ZodNullable<z.ZodString>;
|
|
41
|
+
latest_action_description: z.ZodNullable<z.ZodString>;
|
|
42
|
+
latest_passage_date: z.ZodNullable<z.ZodString>;
|
|
43
|
+
openstates_url: z.ZodOptional<z.ZodString>;
|
|
44
|
+
sponsorships: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
entity_type: z.ZodString;
|
|
47
|
+
primary: z.ZodBoolean;
|
|
48
|
+
classification: z.ZodString;
|
|
49
|
+
person: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
id: z.ZodString;
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
54
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
55
|
+
description: z.ZodString;
|
|
56
|
+
date: z.ZodString;
|
|
57
|
+
classification: z.ZodArray<z.ZodString>;
|
|
58
|
+
order: z.ZodNumber;
|
|
59
|
+
organization: z.ZodObject<{
|
|
60
|
+
name: z.ZodString;
|
|
61
|
+
classification: z.ZodString;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
}, z.core.$strip>>>;
|
|
64
|
+
votes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
65
|
+
id: z.ZodString;
|
|
66
|
+
motion_text: z.ZodString;
|
|
67
|
+
start_date: z.ZodString;
|
|
68
|
+
result: z.ZodString;
|
|
69
|
+
identifier: z.ZodString;
|
|
70
|
+
counts: z.ZodArray<z.ZodObject<{
|
|
71
|
+
option: z.ZodString;
|
|
72
|
+
value: z.ZodNumber;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
votes: z.ZodArray<z.ZodObject<{
|
|
75
|
+
option: z.ZodString;
|
|
76
|
+
voter_name: z.ZodString;
|
|
77
|
+
voter: z.ZodOptional<z.ZodObject<{
|
|
78
|
+
id: z.ZodString;
|
|
79
|
+
name: z.ZodString;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
}, z.core.$strip>>>;
|
|
83
|
+
abstracts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
84
|
+
abstract: z.ZodString;
|
|
85
|
+
note: z.ZodString;
|
|
86
|
+
}, z.core.$strip>>>;
|
|
87
|
+
versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
note: z.ZodString;
|
|
90
|
+
date: z.ZodString;
|
|
91
|
+
links: z.ZodArray<z.ZodObject<{
|
|
92
|
+
url: z.ZodString;
|
|
93
|
+
media_type: z.ZodString;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
}, z.core.$strip>>>;
|
|
96
|
+
documents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
97
|
+
id: z.ZodString;
|
|
98
|
+
note: z.ZodString;
|
|
99
|
+
date: z.ZodString;
|
|
100
|
+
links: z.ZodArray<z.ZodObject<{
|
|
101
|
+
url: z.ZodString;
|
|
102
|
+
media_type: z.ZodString;
|
|
103
|
+
}, z.core.$strip>>;
|
|
104
|
+
}, z.core.$strip>>>;
|
|
105
|
+
related_bills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
106
|
+
identifier: z.ZodString;
|
|
107
|
+
legislative_session: z.ZodString;
|
|
108
|
+
relation_type: z.ZodString;
|
|
109
|
+
}, z.core.$strip>>>;
|
|
110
|
+
}, z.core.$strip>, readonly [{
|
|
111
|
+
readonly reason: "missing_lookup_params";
|
|
112
|
+
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
113
|
+
readonly when: "Neither openstates_id nor the complete jurisdiction+session+bill_id triple was provided.";
|
|
114
|
+
readonly recovery: "Provide either openstates_id (from openstates_search_bills results) or all three of: jurisdiction, session, and bill_id.";
|
|
115
|
+
}, {
|
|
116
|
+
readonly reason: "not_found";
|
|
117
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
118
|
+
readonly when: "Bill does not exist at the given path or OCD ID.";
|
|
119
|
+
readonly recovery: "Verify the session identifier with openstates_get_jurisdiction and confirm the bill_id format matches the legislature convention (e.g., \"HB 1000\" not \"HB1000\").";
|
|
120
|
+
}]>;
|
|
121
|
+
//# sourceMappingURL=get-bill.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-bill.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-bill.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAgB3E,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkWlB,CAAC"}
|