search
Find matching NYC Charter, Administrative Code, and Rules sections using short keywords or exact phrases, with relevance-ranked results by heading, citation, and body text.
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. 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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results to return (default 10, max 50) | |
| query | Yes | Keywords or an exact phrase (short keyword queries work best) | |
| corpus | No | Which document to search (default: all) |