Skip to main content
Glama

GoCodebook — California Building Codes

search_california_codes

Search California building codes (Title 24), state housing law and California city and county zoning/municipal codes by TOPIC, when the user does not already have a section number — e.g. "minimum attic access opening", "ADU setbacks in San Jose". Requires the user's GoCodebook account and uses 1 credit per search (also when nothing is found). If the user already cites a section number, use lookup_california_code_section instead — it is free. Returns ranked excerpts with citations and links. It does NOT decide whether a project complies.

Input Schema

NameRequiredDescriptionDefault
queryYesWhat to find, in plain words. Up to 300 characters.
sourcesNoOptional. Limit to federal law, state codes, or local ordinances.
code_editionNoOptional. Which Title 24 cycle to search; a permit filed in 2024 is enforced under "2022". Defaults to "current".
jurisdictionNoOptional. A California city or county slug ("san-jose", "marin-county") to search that place's own code together with the state codes. Omit for statewide.

Output Schema

NameRequiredDescriptionDefault
hintNoThe search page's own notice about this query (a missing section, a zone code in the wrong city, a code the library does not hold, an address). Tell the user what it says.
as_ofNo
queryNo
statusYesfound / no_results: the search ran and 1 credit was charged (a search with no results still costs a credit). signin_required: the user must connect their GoCodebook account. credits_required: the account has no search credits left; plans_url is an informational page about GoCodebook plans. rate_limited / error: nothing ran and nothing was charged.
messageNo
resultsNoRanked best-first. Each excerpt is a short passage, never the whole section.
plans_urlNo
historicalNo
section_refNo
credits_chargedNo
applied_question_urlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "applied_question_url": {
      +      "type": "string"
      +    },
      +    "as_of": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "credits_charged": {
      +      "type": "integer"
      +    },
      +    "hint": {
      +      "description": "The search page's own notice about this query (a missing section, a zone code in the wrong city, a code the library does not hold, an address). Tell the user what it says.",
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "historical": {
      +      "type": "boolean"
      +    },
      +    "message": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "plans_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "query": {
      +      "properties": {
      +        "code_edition": {
      +          "enum": [
      +            "current",
      +            "2022",
      +            "2019"
      +          ],
      +          "type": "string"
      +        },
      +        "jurisdiction": {
      +          "type": "string"
      +        },
      +        "query": {
      +          "type": "string"
      +        },
      +        "sources": {
      +          "items": {
      +            "enum": [
      +              "federal",
      +              "state",
      +              "local"
      +            ],
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "query",
      +        "jurisdiction",
      +        "code_edition"
      +      ],
      +      "type": "object"
      +    },
      +    "results": {
      +      "description": "Ranked best-first. Each excerpt is a short passage, never the whole section.",
      +      "items": {
      +        "properties": {
      +          "citation": {
      +            "description": "Cite exactly this string.",
      +            "type": "string"
      +          },
      +          "document_slug": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "document_title": {
      +            "type": "string"
      +          },
      +          "edition": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "excerpt": {
      +            "type": "string"
      +          },
      +          "excerpt_truncated": {
      +            "type": "boolean"
      +          },
      +          "heading": {
      +            "type": "string"
      +          },
      +          "section_number": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "source_url": {
      +            "description": "Link to the full section. Always show it.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "document_title",
      +          "heading",
      +          "citation",
      +          "source_url",
      +          "excerpt",
      +          "excerpt_truncated"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "section_ref": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "status": {
      +      "description": "found / no_results: the search ran and 1 credit was charged (a search with no results still costs a credit). signin_required: the user must connect their GoCodebook account. credits_required: the account has no search credits left; plans_url is an informational page about GoCodebook plans. rate_limited / error: nothing ran and nothing was charged.",
      +      "enum": [
      +        "found",
      +        "no_results",
      +        "signin_required",
      +        "credits_required",
      +        "rate_limited",
      +        "error"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "applied_question_url": {
      -      "type": "string"
      -    },
      -    "as_of": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "credits_charged": {
      -      "type": "integer"
      -    },
      -    "hint": {
      -      "description": "The search page's own notice about this query (a missing section, a zone code in the wrong city, a code the library does not hold, an address). Tell the user what it says.",
      -      "type": [
      -        "object",
      -        "null"
      -      ]
      -    },
      -    "historical": {
      -      "type": "boolean"
      -    },
      -    "message": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "query": {
      -      "properties": {
      -        "code_edition": {
      -          "enum": [
      -            "current",
      -            "2022",
      -            "2019"
      -          ],
      -          "type": "string"
      -        },
      -        "jurisdiction": {
      -          "type": "string"
      -        },
      -        "query": {
      -          "type": "string"
      -        },
      -        "sources": {
      -          "items": {
      -            "enum": [
      -              "federal",
      -              "state",
      -              "local"
      -            ],
      -            "type": "string"
      -          },
      -          "type": "array"
      -        }
      -      },
      -      "required": [
      -        "query",
      -        "jurisdiction",
      -        "code_edition"
      -      ],
      -      "type": "object"
      -    },
      -    "results": {
      -      "description": "Ranked best-first. Each excerpt is a short passage, never the whole section.",
      -      "items": {
      -        "properties": {
      -          "citation": {
      -            "description": "Cite exactly this string.",
      -            "type": "string"
      -          },
      -          "document_slug": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "document_title": {
      -            "type": "string"
      -          },
      -          "edition": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "excerpt": {
      -            "type": "string"
      -          },
      -          "excerpt_truncated": {
      -            "type": "boolean"
      -          },
      -          "heading": {
      -            "type": "string"
      -          },
      -          "section_number": {
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          },
      -          "source_url": {
      -            "description": "Link to the full section. Always show it.",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          }
      -        },
      -        "required": [
      -          "document_title",
      -          "heading",
      -          "citation",
      -          "source_url",
      -          "excerpt",
      -          "excerpt_truncated"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "section_ref": {
      -      "type": [
      -        "object",
      -        "null"
      -      ]
      -    },
      -    "status": {
      -      "description": "found / no_results: the search ran and 1 credit was charged (a search with no results still costs a credit). signin_required: the user must connect their GoCodebook account. credits_required: the account has no credits — send the user to upgrade_url. rate_limited / error: nothing ran and nothing was charged.",
      -      "enum": [
      -        "found",
      -        "no_results",
      -        "signin_required",
      -        "credits_required",
      -        "rate_limited",
      -        "error"
      -      ],
      -      "type": "string"
      -    },
      -    "upgrade_url": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "required": [
      -    "status"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations leave the operational profile ambiguous (readOnlyHint=false, non-idempotent) but the description explains why: it consumes 1 credit per search, including fruitless searches, and requires a GoCodebook account. It also sets expectations on output (ranked excerpts with citations/links) and negates a capability users might assume (compliance decisions). That is substantive disclosure well beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Roughly four sentences, all load-bearing: scope, credit cost, alternative, return shape, and negative scope. The routing cue (no section number) and the sibling alternative are front-loaded, so nothing must be read twice.

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?

An output schema exists, so return values need not be re-explained, yet the description still characterizes them as ranked excerpts with citations. Account requirement, cost model, routing to the free sibling, and the compliance disclaimer cover everything an agent needs before invoking a credit-consuming search.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so query, sources, code_edition, and jurisdiction are already documented in the schema; the baseline is 3. The description's example queries ('minimum attic access opening', 'ADU setbacks in San Jose') illustrate the topic-style phrasing expected for the query parameter, but add no syntax or format detail beyond the schema.

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?

States a specific verb (Search) plus the resource set (California building codes Title 24, state housing law, city/county municipal codes) and the topic-based input mode. It explicitly names the sibling used for the alternative case (lookup_california_code_section), so an agent can route without opening either schema.

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?

Gives an explicit trigger ('when the user does not already have a section number'), concrete query examples, and a named alternative with the condition that selects it ('If the user already cites a section number... it is free'). It also states the negative scope ('does NOT decide whether a project complies').

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