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

nyc-charter-laws-rules

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NYC_CLR_FOOTERNoSets how much of the disclaimer footer is appended: `full-then-compact` (default) sends the full footer on the first response after server start and the one-line footer afterwards; `full` sends the full footer on every response. Unset or blank means the default; any other value means `full`.
NYC_LAWS_INDEX_DIRNoDirectory holding versions.json, charter.json, admin_code.json, and rules.json to serve instead of the bundled index. A leading ~/ expands to your home directory; any other relative path resolves against the server process's working directory. Unset or blank means the bundled index.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.


⚠️ This information is for research and informational purposes only and does not constitute legal advice. NYC laws and rules are amended frequently — always verify the current text at https://codelibrary.amlegal.com/codes/newyorkcity/latest/overview before acting on any information. For the latest rules information, see https://rules.cityofnewyork.us. For legal matters, consult a licensed attorney.

Official disclaimer from American Legal Publishing: The Codes and other documents that appear on this site may not yet reflect the most current legislation or rules adopted by the City. In addition, certain textual errors and omissions may temporarily exist, resulting from problems in the source database provided to American Legal and from which this website was created. Although these errors and omissions are being corrected, any user discovering any such error is invited to contact the publisher at NYC.editor@amlegal.com or 800-445-5588 and/or the NYC Law Department at NYCCodeRulesCharter@law.nyc.gov.

Built by BetaNYC (https://beta.nyc). Feedback and improvements welcome — file a GitHub issue at https://github.com/BetaNYC/nyc-charter-laws-rules.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
searchA

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. 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, those with every term first; the response's first line says when this happened and which terms were used. For informational purposes only. Not legal advice. Verify against official sources at codelibrary.amlegal.com before relying on any result.

get_sectionA

Retrieve a specific section by its citation (e.g. '§ 259', 'Section 259', '11-602.1', 'Chapter 11'). Input is normalized (with or without '§', any case). Pass 'corpus' to disambiguate when the same citation exists in multiple documents (e.g. charter 'Chapter 3' vs a rules chapter); if multiple sections still match, a disambiguation list is returned. For informational purposes only. Not legal advice. Verify against official sources at codelibrary.amlegal.com before relying on any result.

list_titlesC

List the top-level chapters or titles of a document. For informational purposes only. Not legal advice. Verify against official sources at codelibrary.amlegal.com before relying on any result.

get_titleB

Retrieve chapter/title records matching an identifier (whole-token match: 'Chapter 1' does not match 'Chapter 10'). Note: the index is flat — deep hierarchy (every section nested within a title) is not indexed, so this returns matching chapter/title-level records, not full title contents. For informational purposes only. Not legal advice. Verify against official sources at codelibrary.amlegal.com before relying on any result.

get_versionA

Return the currency date for each document — how current the Charter, Administrative Code, and Rules are. Each corpus updates on its own schedule. Always call this tool before answering legal questions so responses are grounded in the correct version of the law. For informational purposes only. Not legal advice. Verify against official sources at codelibrary.amlegal.com before relying on any result.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a distinct role: keyword discovery, citation-based section retrieval, title listing, title-record retrieval, and version metadata. The similar list_titles and get_title tools are adequately separated by their list-versus-lookup behavior and return scopes.

Naming Consistency4/5

Names consistently use readable snake_case, and four follow a clear verb_noun pattern. The standalone search name is a minor deviation from the otherwise explicit get_ and list_ conventions.

Tool Count5/5

Five tools are well scoped for read-only legal research across three corpora. Each supports a distinct discovery, retrieval, navigation, or currency-checking task without unnecessary duplication.

Completeness4/5

The surface covers keyword search, direct retrieval, top-level browsing, title lookup, and version awareness, supporting the core research workflow. Hierarchical navigation is somewhat incomplete because get_title does not return full title contents and there is no dedicated operation for listing sections within a title, though search and citation retrieval provide workarounds.

Maintenance

ActivityActive
ResponsivenessUsually handled