Skip to main content
Glama
nyc-charter-laws-rules

nyc-charter-laws-rules

Search the law text

search
Read-only

Find NYC Charter, Administrative Code, and Rules sections by short keyword or exact phrase. Use keywords rather than full questions to get relevant matches.

Instructions

Keyword search across the NYC Charter, Administrative Code, and Rules of the City of New York. This is keyword matching, not a question-answering engine: short keyword queries work best (e.g. 'sidewalk shed', 'water tank inspection'), not full questions. An empty query is an error. A query or term of 3 or fewer letters and digits matches whole words only ('x' is not the x in 'wax'). The query is first matched as an exact phrase (quotes around the whole query are removed first); results are relevance-ranked, with heading matches above citation matches above body-text matches, and whole-word matches above substring matches. If the phrase matches nothing, question words and common words are dropped and sections containing the remaining terms are returned, ranked so rare words and words in a heading count most; the response's first line says when this happened and which terms were used. Each snippet is the text around the first match.

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results to return (default 10, max 50)
queryYesKeywords or an exact phrase (short keyword queries work best)
corpusNoWhich document to search (default: all)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.6.0
    • addedInput schema / properties / limit / maximum
      Added value: +50
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • changedInput schema / properties / limit / type
      Previous value: -"number"New value: +"integer"
  2. First observedv0.4.4

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description goes well beyond them by disclosing the matching pipeline: exact-phrase first, quote stripping, whole-word rule for 3-or-fewer-character terms, the ranking tiers, and the fallback that drops question words when nothing matches. It also notes the response's first line announces the fallback and which terms were used, plus what a snippet contains.

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 purpose and the keyword-vs-question contrast, then progressively deeper matching detail. Every sentence is substantive, though the single dense paragraph on ranking and fallback is long enough that the empty-query error rule is buried mid-block.

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?

With no output schema, the description still explains the response shape (first line reporting fallback terms, snippets as surrounding text), covers the error case for an empty query, and fully describes the matching semantics. Nothing an agent needs in order to call it correctly is missing.

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, but the description adds real interpretive detail for `query` beyond 'Keywords or an exact phrase': quotes are removed, short terms match whole words only, and phrase-vs-fallback behavior. `limit` and `corpus` are left entirely to the schema.

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 and resource plus the exact corpora covered: 'Keyword search across the NYC Charter, Administrative Code, and Rules of the City of New York.' The word 'keyword' immediately distinguishes it from the retrieval siblings (get_section, get_title, list_titles), which navigate rather than search.

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 clear positive guidance ('short keyword queries work best') with concrete examples and a clear exclusion ('not a question-answering engine... not full questions'). It does not name a sibling to use instead for known-section lookup, so the routing to get_section/get_title is left implicit.

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