Skip to main content
Glama

On the Books

Search a town's code

search_code
Read-onlyIdempotent

Search one town's municipal code (its local ordinances) by keyword and get the matching passages in the code's own words, each with its chapter and section, plus the link to the town's official published code. No key needed, no model call. Leave "town" out to search every town's code at once (needs a connected pass or a key). Read-only.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
townNoThe town's id from find_town, e.g. "maplewood-nj". Omit to search all towns (connected pass or key required).
queryYesA few keywords for the rule, e.g. "fence height", "backyard chickens", "short-term rental permit".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, open-world, so the safety profile is covered. The description adds value annotations cannot: no API key or model call required for the default path, an authentication prerequisite when town is omitted, and a concrete statement of what comes back (verbatim passages, citations, official link). It stops short of mentioning result caps, pagination, or failure behavior for an invalid town id.

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?

Front-loaded with the core action, then the scope default and auth caveat, then a one-word safety note. The parenthetical gloss on "municipal code" earns its space, though the trailing "Read-only" is redundant with annotations and the pass/key condition appears twice.

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 correctly takes on the burden of describing return values — verbatim passages, chapter/section, and official link — and flags the auth requirement for the cross-town mode. It is complete enough to call confidently, with only minor gaps around result volume and behavior when the town id is unrecognized.

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 coverage is 100% and both parameters are documented in the schema, including the town-omission behavior and the pass/key requirement. The description largely restates those facts rather than adding new meaning such as matching semantics, relevance ordering, or how multiple keyword terms combine.

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+resource ("search one town's municipal code ... by keyword") and describes the returned artifact (matching passages in the code's own words with chapter/section plus a link to the official code). The phrase "no model call" implicitly distinguishes it from an answer-synthesizing sibling like ask, so an agent can route between retrieval and Q&A 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?

Gives an explicit usage branch: omitting "town" searches every town at once and requires a connected pass or key, while a single-town search needs no key. It does not explicitly say when to prefer this over ask or compare, but the retrieval-vs-model distinction is clear enough from "in the code's own words" and "no model call".

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.

Resources