Skip to main content
Glama

us-lobbying-mcp-server

Uslobbying Get Issue Spending

uslobbying_get_issue_spending
Read-onlyIdempotent

Aggregate separate income and expense amounts on quarterly filings mentioning issue_code across explicit years. This is whole-filing association, not allocated issue spending; issue buckets overlap. All versions are acquired before latest-period selection and local issue filtering. Broad scans can take hours; narrow client_id or registrant_id when appropriate. Follow collecting cursors before interpreting final typed rows or SQL datasets. Pass a selected filing UUID to uslobbying_search_filings for its complete record.

Input Schema

NameRequiredDescriptionDefault
yearsNoRequired explicit analytical year scope; sorted and deduplicated.
cursorNoContinue the original scope; other query fields may be omitted.
row_setsNoInline analytical sets; omit for all sets. Selection never limits acquisition, totals or SQL staging. Omitted sets remain available from a new call with another selection or staged tables. Continue with omitted or equivalent row_sets.
canvas_idNoReuse this canvas only after complete analytical acquisition.
client_idNoOptional client relationship record ID from candidates[].id in uslobbying_get_client_profile resolve mode; candidates[].client_id is secondary.
max_pagesNoSource pages per call; positive integers clamp to five, default one for discovery, five for analysis.
page_sizeNoUpstream rows per page; positive integers clamp to 25, default 25.
issue_codeNoRequired first-call code from uslobbying_list_reference topic issue_codes.
record_pathNoJSON Pointer to a stored value; empty selects the root.
record_limitNoMaximum object entries or array items, clamped to 25; text fragments use the response byte budget.
record_handleNoTenant/tool-bound deferred record handle.
record_offsetNoKey, item or Unicode-code-point offset.
registrant_idNoOptional native registrant scope.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
firmsNoFirm breakdowns in this window.
yearsNoExplicit requested years.
offsetNoFinal record delivery offset.
sourceNoOfficial source system.
statusNoSource acquisition status, separate from row delivery.
datasetNoComplete SQL metadata on the first final window and its replay.
noticesNoLimitations and success notices.
coverageNoAcquisition progress, independent of delivery.
guidanceNoTable names and dataframe instructions.
canvas_idNoTenant-scoped canvas access token.
truncatedNoMore data is available through next_cursor or record_handles; no source data was discarded.
activitiesNoSelected activities in this window; no money columns.
issue_codeNoRequested issue membership code.
query_toolNoQuery or retrieve materialized table rows.
selectionsNoVersion-selection decisions in this window.
attributionNoRequired verbatim attribution for LDA data.
issue_codesNoOverlapping issue breakdowns in this window.
methodologyNoAccounting limitations.
next_cursorNoNext acquisition or output window cursor.
raw_filingsNoAll acquired versions in this window, including selected versions.
retrieved_atNoRetrieval ISO timestamp.
describe_toolNoInspect exact table schemas before SQL.
record_windowNoLossless stored parent window.
total_recordsNoExact final record count when known.
annual_ledgersNoComplete-year ledgers in this window; absent while collecting.
record_handlesNoDeferred complete parents.
retrieval_toolNoTool that retrieves this parent.
row_set_totalsNoExact all-set totals after acquisition completes.
delivery_limitsNoClamped controls for this call; an empty map means no clamp. Immediate cursor replay retains its original values.
output_completeNoWhether all result rows have been delivered.
row_set_offsetsNoSelected-set rows delivered or deferred before this window; others zero.
canvas_availableNoSQL canvas support is enabled.
records_deferredNoOversized parents available through handles.
records_returnedNoComplete records delivered in this window.
selected_filingsNoComplete selected filings in this window.
attribution_basisNoWhole filings mentioning an issue; buckets overlap.
cursor_expires_atNoContinuation expiry ISO timestamp.
effective_filtersNoNormalized effective scope.
targeted_entitiesNoTargeted entities in this window.
snapshot_source_urlsNoOfficial snapshot URLs.
snapshot_retrieved_atNoFARA snapshot retrieval timestamp.
snapshot_last_modifiedNoUpstream Last-Modified header.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly and idempotent, but the description adds substantive behavior: whole-filing association rather than allocated amounts, overlapping issue buckets, all versions acquired before latest-period selection and local issue filtering, and a real latency warning ('can take hours'). The cursor instruction ('follow collecting cursors before interpreting final typed rows or SQL datasets') discloses a non-obvious execution contract that would otherwise cause misreads.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the key caveat are front-loaded in the first two sentences, then performance, cursor, and handoff notes follow in priority order. It is dense but every sentence carries operational information; only the repeated references to versions/cursors verge on redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter aggregation tool with an output schema and full annotation coverage, the description supplies the remaining load-bearing context: association semantics, overlap caveat, latency, cursor discipline, and cross-tool handoffs. An agent has enough to call it correctly and to interpret the results without over-reading them as allocated issue spending.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: years is an explicit analytical scope, issue_code must come from uslobbying_list_reference topic issue_codes on the first call, and client_id should be resolved from uslobbying_get_client_profile candidates. The cursor guidance further frames how row_sets and continuation interact with acquisition and totals.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names a specific verb (aggregate) and resource (income/expense amounts on quarterly filings keyed to issue_code across explicit years). It immediately disambiguates the semantics with 'whole-filing association, not allocated issue spending; issue buckets overlap', which no sibling would claim. The handoff sentence to uslobbying_search_filings clarifies the boundary against that sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives concrete operating advice: 'Broad scans can take hours; narrow client_id or registrant_id when appropriate', and tells the agent to pass a selected filing UUID to uslobbying_search_filings for the complete record. That covers when to narrow and where to escalate, but there is no explicit when-not-to-use versus siblings like uslobbying_get_contributions or uslobbying_dataframe_query.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.