> ## Documentation Index
> Fetch the complete documentation index at: https://ploti.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Municipal codes

> How an assistant reads any US city's or county's code from Municode, and falls back to the ordinance documents Ploti holds when Municode can't help

Many real estate questions turn on a city's or county's code of ordinances, which includes its zoning rules. Most US places publish theirs through Municode, the largest publisher of municipal codes. An AI assistant connected to Ploti can read a code there for any US place, whether or not it is in your coverage areas (the counties your Ploti plan covers).

A connected chat assistant uses the `municode_search` and `municode_read` tools. An assistant that uses only Ploti's command-line tool, such as Muse, runs `ploti municode search` and `ploti municode read`, shown in the CLI tab on the right.

## Find the code, then the section

Municode has its own ids, which these calls hand back to you:

1. **Find the place's code.** `municode_search` with a `state` (two letters, such as `FL`) and a `place` (such as `Winter Garden`) returns the place's `client_id`.
2. **Search it.** `municode_search` with the `client_id` and `text` returns matching sections, each with a `node_id`. With the `client_id` alone, it returns the code's table of contents; add a `node_id` to open one branch of it.
3. **Read a section.** `municode_read` with the `client_id` and a `node_id` returns the section's text. `cursor` reads further into a long section.

A search returns at most 50 results.

## When Municode can't help

Municode doesn't publish every place's code, and it sometimes refuses or fails a request. The assistant then searches the ordinance documents Ploti holds instead:

* `documents_search` with the place and a question finds the passage.
* `documents_read` opens the section.
* `datasets_search` with `kinds` `["document"]` shows which codes Ploti holds for a place.

[Documents and collections](https://ploti.ai/docs/developers/documents.md) explains those reads.

```json MCP theme={null}
{
  "tool": "municode_search",
  "arguments": { "client_id": 12345, "text": "self-storage" }
}
```

```bash CLI theme={null}
ploti municode search --state FL --place "Winter Garden"
ploti municode search --client-id 12345 --text "self-storage"
ploti municode read --client-id 12345 --node-id ZOCO_CH98
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.