Skip to main content
Glama

Get Public Laws

get_public_laws
Read-onlyIdempotent

ANSWERS "how many public laws has the 119th Congress passed" / "most recent public law" / "list of laws enacted this Congress", returns public (or private) laws enacted in one Congress, from congress.gov's official /law endpoint. GovTrack never had an equivalent endpoint at all. Returns the total count, the most recent law (number, originating bill, title, enactment date), and the list of laws (newest first). Requires an API key (see get_bill).

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "congress": 119
    },
    "name": "get_public_laws"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of laws to return (default: 20, max: 100).
congressYesCongress number, e.g. 119 for the 119th Congress (2025-2026).
law_typeNo"pub" (default, public laws) or "priv" (private laws).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / congress / description
      Previous value: -"Congress number, e.g. 119 for the 119th Congress (2025–2026)."New value: +"Congress number, e.g. 119 for the 119th Congress (2025-2026)."
  2. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds genuinely useful context beyond that: a required API key, the upstream source (congress.gov /law), the public-vs-private law split, and the shape of the result (total count, most recent law with number/bill/title/enactment date, list newest first). Missing operational details such as pagination or rate limits keep it from a 5.

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?

The intent-matching questions are front-loaded, which helps retrieval, and the return-shape sentence is compact. The aside 'GovTrack never had an equivalent endpoint at all' is comparative marketing rather than decision-relevant information and slightly dilutes the otherwise efficient structure.

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

Completeness4/5

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

With no output schema, the description carries the burden of explaining return values and does so concretely (count, most recent law fields, ordered list). Parameter documentation is delegated correctly to the schema, and the API key prerequisite is flagged. Only minor gaps remain, such as what happens when a Congress has zero laws or how large result sets behave beyond the limit cap.

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

Parameters3/5

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

Schema description coverage is 100%, so all three parameters (congress, limit, law_type) are already documented with defaults and max values in the schema. The description only reinforces the 'one Congress' scoping and the pub/priv distinction, adding little meaning beyond structured data — baseline 3 is appropriate.

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

Purpose4/5

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

The description uses a precise verb+resource framing ('returns public (or private) laws enacted in one Congress') and scopes it to the congress.gov /law endpoint, so an agent knows exactly what data comes back. It stops short of naming a sibling tool (e.g. congress_search_bills or get_recent_bills) as the contrasting choice, so differentiation is inferred rather than stated.

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?

Three concrete example questions ('how many public laws has the 119th Congress passed', 'most recent public law', 'list of laws enacted this Congress') effectively map user intents to this tool, which is strong implicit when-to-use guidance. There are no explicit when-not conditions or named alternatives for the neighboring bill-search tools, so the guidance is clear but not exhaustive.

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.