Skip to main content
Glama
Vaquill-AI/vaquill-mcp

Vaquill-AI/vaquill-mcp

Official
by Vaquill-AI

Count Sections in a Scope

count_statute_sections
Read-only

Count statute sections in a jurisdiction, corpus, code, title, chapter or part, or count Boolean matches, to size a job before walking divisions or paging a search.

Instructions

Exact section count for a jurisdiction, corpus, code, title, chapter or part, or the number of sections matching a Boolean expression (query with matchType boolean, syntax as search_us_statutes). Use to size a job before walking divisions or paging a Boolean search. A natural-language question cannot be counted. isExact false means an upper bound (phrases, proximity, or filters beyond corpusType, state and status). A zero count may indicate a wrong filter.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
codeNoState code identifier, e.g. `tx_26`. With `corpusType=FEDERAL_RULES`, a rule set instead (`frcp`, `uscapp_t28a_fre`). Same values and checks as `code` on `/search`.
partNoCFR part identifier. Pair with `titleNumber`.
queryNoA Boolean expression to count, with matchType `boolean` (syntax as on search_us_statutes). Omit to count the whole scope. A natural-language question cannot be counted: rank it with search_us_statutes.
stateNoTwo-letter jurisdiction code or `federal`, single or list.
articleNoArticle label (`Amendment XIV`) on CONSTITUTION / STATE_CONSTITUTION, or article number (`2-A`) on a STATE / REGULATION code divided by article. Same values and pairing rules as `article` on `/search`.
chapterNoChapter identifier. Pair with `titleNumber` or `code`.
actStatusNoCount only sections carrying this status.
matchTypeNo`"boolean"` to count the sections satisfying `query`. Required with `query`.
corpusTypeNoCorpus to count, single or list. Omit to count every corpus.
titleNumberNoUSC or CFR title number.
Idempotency-KeyNoOptional, 16 to 255 visible ASCII characters (a UUIDv4 is ideal). A retry with the same key and request replays the original 2xx for 24 hours without charging again; the same key with a different request is rejected.
excludeRepealedNoOnly sections with an affirmatively dead status are excluded. Sections with no recorded status are kept. US Code uses a stored annual edition, so sections repealed after that edition closed are still counted.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered; the description adds real value on top by explaining that isExact=false is an upper bound, which filter classes cause that, and that a zero count may signal a bad filter rather than an empty corpus. It does not mention cost or credit consumption, which is the main remaining behavioral unknown.

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

Conciseness5/5

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

Four short sentences, front-loaded with what is counted, then usage, then the two caveats that affect interpretation of the result. No filler and nothing repeated from the schema verbatim beyond the minimum needed to connect query and matchType.

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 12 optional parameters, an output schema, and full annotation coverage, the description covers the scope model, the Boolean path, exactness, and zero-count diagnosis. It stops short of noting that no parameters are required (so an unfiltered call counts everything, which is only implied by the corpusType schema text) and says nothing about billing, but otherwise an agent has what it needs.

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

Parameters4/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; the description still adds meaning by tying `query` to matchType `boolean` and by naming which parameters (corpusType, state, status) do not degrade exactness while other filters do. That is semantic guidance the per-parameter schema text does not state as a combined rule.

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?

States a specific verb (count) and resource (sections) with the exact scope axes enumerated: jurisdiction, corpus, code, title, chapter, part, or Boolean expression. It also distinguishes itself from the search sibling by framing the Boolean form as a count of matches rather than a ranked list, so an agent can separate it from search_us_statutes without opening a schema.

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?

"Use to size a job before walking divisions or paging a Boolean search" gives a concrete when-to-use, and "A natural-language question cannot be counted" is an explicit exclusion. The alternative for natural-language questions is only implied (search_us_statutes is named for syntax, and the schema says to rank there), so the routing is clear but not spelled out as a full when-not/use-instead pair.

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