Skip to main content
Glama

code_search

Read-onlyIdempotent

Full-text search of the Code: words, or a citation, or both. A citation among words returns that section first; a query that names an act returns the section stating its short title first. Search matches the words of the document: ask in the words the statute would use. in_headings searches only headings and catchlines and adds the matching units.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
titleNo
chapterNo
in_headingsNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

The description discloses detailed ranking behavior (citation returns that section first, act name returns short title section first) and clarifies that matching is on document words. It also explains the in_headings parameter's effect. These go beyond the annotations (readOnlyHint, idempotentHint) and are valuable for predicting search results.

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?

The description is three sentences, front-loaded with the core purpose. Every sentence adds substantive information: the main search capability, the citation/act behavior, and the in_headings option. No filler or repetition.

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

Completeness3/5

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

The tool is moderately complex (search with citation handling and in_headings), and while the description covers the query behavior well, it omits any explanation of the 'title' and 'chapter' parameters, which are likely used for scoping. There is no output schema, so the description does not hint at the return format, but the annotations (read-only, idempotent) make it a safe search. The missing parameter explanations leave an agent guessing how to use those filters effectively.

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?

The description explains the 'query' parameter (words or citation) and 'in_headings' parameter, but it does not explain 'limit', 'title', or 'chapter'. With schema description coverage at 0%, the description must compensate, but it only partially does so. The schema provides types and defaults but not semantic meaning, so the description adds value for two of the five parameters but leaves the others unexplained.

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 description clearly states the tool performs full-text search of the Code, with a specific resource (the Code) and a specific verb (search). It differentiates from siblings like bills_search and opinions_search by specifying 'the Code'. It also explains the behavior with citations and act names, which is unique to this tool.

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

Usage Guidelines3/5

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

The description gives clear context on how to search (using the words of the statute) and what in_headings does, but it does not explicitly mention when to use this tool versus alternatives like code_lookup_section or code_find_act. It implies full-text search is the use case but does not state exclusions or when to prefer a different tool.

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.

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a unique and clearly defined purpose, separated by collection (bills, code, opinions, constitution) and action (list, lookup, search, get_text, browse, etc.). No two tools overlap in functionality.

Naming Consistency5/5

Tool names follow a consistent pattern of collection_action (e.g., bills_list, code_search, opinions_lookup) with snake_case and descriptive verbs. General tools use clear single-word names like search, fetch, and verify_quote.

Tool Count4/5

With 23 tools, the set is slightly larger than the typical 3โ€“15 range, but it is appropriate for a comprehensive legal database covering multiple collections and specialized operations (browse, describe, find, verify). The count is justified by the domain's breadth.

Completeness5/5

The tool set covers all major legal collections (bills, code, constitution, opinions) with CRUD-like operations (list, lookup, search, get_text) and includes cross-cutting utilities (search, fetch, verify_quote, describe_site, get_coverage). No obvious gaps in the expected functionality.

Resources