Skip to main content
Glama

NC General Statutes

Search North Carolina (NC) statutes by topic or keyword

search_statutes
Read-onlyIdempotent

Search North Carolina (NC) statutes by topic, keyword or phrase.

Use this when you know the SUBJECT but not the citation — "what's the NC law about leaving a dog in a hot car", "failure to appear penalty", "when can I expunge a misdemeanor". If you already have a citation, use get_statute instead.

Returns ranked sections with highlighted fragments showing why each matched, not full text: pick the one you want and call get_statute for it.

Supports quoted "exact phrases", -excluded terms and or. match_mode says how the query was read: "all_terms" (every word), "all_terms_with_synonyms" (every word, but the words as typed matched nothing or only weakly, so statutory synonyms were accepted — "car" for "motor vehicle", "leaving" for "confined"; listed in synonyms_used), "any_of" (the query used or), "any_terms" (nothing matched every word, so any word or synonym was accepted) or "citation" (the query was a bare citation, so it was looked up directly; when the section doesn't exist, the nearest real sections by number come back as suggestions). The loose modes only return sections that contain at least one of your words. Results are ordered by terms_matched — how many of the search words a section contains, a quoted phrase counting only when it appears as a phrase — then by catchline_terms_matched, how many are in the section's own heading, then by catchline_coverage, how much of that heading the search words make up (1.0 is an exact title, so "DWI" finds "Impaired driving" before longer sections that merely mention it), then by rank. Court shorthand is expanded automatically and case-insensitively — FTA, DWLR, PJC, AWDW and similar become the statutory wording, because the statute book spells the phrase out and never uses the abbreviation. The expansion is reported back as expanded_query. Shorthand that names one offense lists that offense's section first, marked primary_for (FTA → 15A-543, DWI → 20-138.1).

Searches the law in force today, at section level. A low top rank means the corpus probably has no section on point — NC simply has no statute on some subjects, and saying so is a better answer than the nearest loose word 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_statutes"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of sections to return (1-25).
queryYesTopic, keyword or phrase. Supports quoted "exact phrases", -excluded terms and `or`. Court shorthand (FTA, DWLR, PJC) is expanded for you.
chapterNoOnly sections in this General Statutes chapter.
include_repealedNoAlso return repealed sections. Off by default, so results are law in force.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / chapter / description
      Added value: +"Only sections in this General Statutes chapter."
    • addedInput schema / properties / chapter / examples
      Added value: +[
      +  "14",
      +  "15A"
      +]
    • addedInput schema / properties / include_repealed / description
      Added value: +"Also return repealed sections. Off by default, so results are law in force."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of sections to return (1-25)."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond readOnlyHint and idempotentHint, the description discloses non-obvious behavior: results are ranked sections with highlighted fragments rather than full text, and the ordering is by terms_matched, catchline_terms_matched, catchline_coverage, then rank. It also explains synonym expansion, expanded_query reporting, primary_for marking, and that a low top rank may mean NC has no statute on point – all material context an agent could not infer from annotations.

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?

It is long, but front-loaded: purpose, when-to-use, alternative, then return behavior and matching semantics. Most sentences carry operational meaning, though the detailed ranking chain and match_mode enumeration are dense and could be trimmed slightly without losing essential guidance.

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?

For a search tool with four parameters and subtle matching behavior, the definition covers selection guidance, result shape, ranking logic, synonym and shorthand handling, and failure interpretation. An output schema exists, yet the description still gives enough about return values for an agent to act correctly.

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 schema already documents query, limit, chapter and include_repealed. The description still adds value by explaining how the query string is interpreted in practice – quoted phrases, excluded terms, `or`, automatic shorthand expansion, and the synonym fallback that produces match_mode values like all_terms_with_synonyms. It does not add much on the other three parameters, which is fine given the schema already covers them.

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 definition opens with a specific verb and resource ('Search North Carolina (NC) statutes by topic, keyword or phrase') and immediately scopes it to subject-based lookup rather than citation lookup, which distinguishes it from get_statute.

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

Usage Guidelines5/5

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

It states the exact condition for use ('when you know the SUBJECT but not the citation') with concrete example queries, and names the alternative path explicitly: 'If you already have a citation, use get_statute instead.' It also advises on what to do with results ('pick the one you want and call get_statute for it').

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