nyc-charter-laws-rules
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| NYC_CLR_FOOTER | No | Sets 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_DIR | No | Directory 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.
When someone asks where an answer's data comes from, how current or accurate it is, whether it is official, or how to check, cite, or correct it, call about_data (with a topic for one kind of data or one tool) and answer from it, naming the source and its publisher. about_data gives each source one of three answers on whether it is official. "Publisher: … BetaNYC did not modify it." means it is the publisher's own record. "BetaNYC modified this data" means this copy is not the official record; say what BetaNYC did, name the official record and give its link. "BetaNYC produced this" means BetaNYC built or collected it, and it is not an official record either. Never call data official when BetaNYC modified or produced it. For who built this server, call about_betanyc; for recent fixes and corrections, call whats_changed.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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. 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. |
| 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. Each title of the Rules restarts its numbers, so name the title: '15 RCNY § 1-01' or 'Title 15 § 1-01' ('24 RCNY Health Code § 81.08'); a bare '§ 1-01' lists every title's, each labeled with its title. A citation may name its book ('NYC Charter § 1133', 'Admin. Code § 27-506'); then only that book is looked in. Code sections: 'FC 102', 'RS 18-1'. A code may be named in words ('Building Code 722.2.1.1.4'); a bare code number ('722.2.1.1.4') is looked for in every code. A part of a section ('§ 1133(b)(1)', 'Section FC 102.4(1)') returns the whole section; the first line names the part. Long text comes in parts, long lists in pages of 25; the answer gives the offset for the next. |
| list_titlesA | List a document's chapters in order, each with its heading. Administrative Code chapters show their section range, since several share a number: 'Chapter 1 (§ 3-101 to § 3-196)'. Rules chapters are listed by title, each title named before its chapters: 'Title 15, Chapter 18'; a chapter with no number, such as the Health Code, by its name: 'Title 24, New York City Health Code'. |
| get_titleA | List a chapter's sections in order: its heading, then each section's citation and heading (get_section gives the text). 'Chapter 70' gives every chapter with that number. Administrative Code and Rules: 'Title 24' gives every record in that title, chapter by chapter, including chapters with no number such as the Health Code ('Title 16' is not 16-A); 'Title 15, Chapter 18' gives only its Chapter 18. Numbers match whole: 'Chapter 1' is not 'Chapter 10' or 'Chapter 1-A'. |
| 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. |
| whats_changedA | What has changed in this server, its data and its website, newest first, from the project's WHATS-CHANGED.md: new tools and pages, new data, data fixes, and corrections when BetaNYC published something wrong. Each correction says what to re-check if you used the old numbers. Call this before relying on a figure you got from this server earlier, or when a user asks whether something was fixed. Filter with since (YYYY-MM-DD; also keeps older entries that have an update on or after that date) and tag (Site, Data, MCP or Correction). |
| about_betanycA | Who built this server and how to reach them: BetaNYC, a project of the Fund for the City of New York. Returns what BetaNYC is, links to its events, newsletter and donation page, where to report a bug in this server or ask for a new feature (this server's GitHub issues), and this server's name and version. |
| about_dataA | Where this server's data comes from and how far to trust it. For each kind of data: who publishes it and a link, whether it is an official record (only data its publisher published and BetaNYC did not modify is; data BetaNYC modified or produced is not), how it was gathered, what BetaNYC did to it (for example cleaned it, matched it to addresses, joined it with other data, or counted it), how current it is on this server, what it covers and what is missing, the terms of use and the credit line to print, where to check a figure at the official record, where to report an error (to BetaNYC when BetaNYC modified or produced the data, to the publisher for the original records, and to this server's issues for a bug), which tools use it, and corrections that touched it. Call it whenever someone asks where an answer comes from, how current or accurate it is, or how to check or cite it. topic narrows it to one kind of data, or to the data behind one tool (give the tool's name). For who built this server, use about_betanyc. Topics on this server: charter, admin-code, rules. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
The retrieval tools form a clear hierarchy — list_titles (document→chapters), get_title (chapter→sections), get_section (citation→text), and search (keywords) — with descriptions that explicitly cross-reference each other, so misselection is unlikely. The only soft overlap is between get_version (how current the law is) and about_data (provenance and currency per data kind), plus the three meta tools about_betanyc/about_data/whats_changed, which are close in flavor though clearly scoped to different questions.
Half the surface follows a clean verb_noun pattern (get_version, get_section, get_title, list_titles), but the rest break it: bare verb 'search', the noun-prefix 'about_betanyc'/'about_data', and the contraction 'whats_changed'. Individually readable and mostly self-describing, but three distinct conventions coexist rather than one predictable pattern.
Eight tools is a sensible size for a legal-corpus server: four retrieval primitives plus version and three provenance/changelog helpers. The meta tools (about_betanyc, about_data, whats_changed) are half of nothing but occupy four of eight slots, which is slightly heavy for support functions, though each serves a distinct user question.
Search, browse (titles/chapters), section retrieval with citation normalization and pagination, plus currency and provenance reporting cover the core legal-research lifecycle well. Minor gaps remain: search appears to have no corpus scoping parameter even though get_section does, and there is no tool to enumerate available documents/corpora or named codes (FC, RS, Building Code) up front, forcing the agent to guess identifiers.