Skip to main content
Glama

GoCodebook — California Building Codes

lookup_california_code_section

Read-onlyIdempotent

Look up the VERBATIM text of a California building, residential, fire, plumbing, mechanical, green (CALGreen), energy or existing-building code section, or a section of a California city or county zoning/municipal ordinance, by its section number. Use this whenever the user cites a section number ("CRC R602.10.2.3", "CBC 1004", "§ 17.60.090") or asks what a specific section says. Returns the official text with its citation, edition and a link to the full section. It returns code text only and does not determine whether a specific project complies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sectionYesThe section number exactly as cited, without the code name. Examples: "R602.10.2.3", "1004", "507.2", "17.60.090", "11B-206".
code_editionNoOptional. Which Title 24 cycle to read. California enforces the edition in force when the permit application was submitted, so a project filed in 2024 is enforced under "2022". Defaults to "current" (the 2025 cycle, in force since 2026-01-01).
jurisdictionNoOptional. A California city or county slug to scope the lookup to its own municipal code — "los-angeles", "san-jose", "marin-county". Omit for statewide Title 24 codes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "ambiguous": {
      -      "description": "True when the number exists in more than one code. Pick by the code the user named and say which one you used; never merge them.",
      -      "type": "boolean"
      -    },
      -    "applied_question_url": {
      -      "description": "Where to send a user whose real question is whether a specific project complies.",
      -      "type": "string"
      -    },
      -    "as_of": {
      -      "description": "The date the codes were read as of (YYYY-MM-DD), or null for the current edition.",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "browse_url": {
      -      "type": "string"
      -    },
      -    "historical": {
      -      "description": "True when this is NOT the current code. Say so to the user.",
      -      "type": "boolean"
      -    },
      -    "matches": {
      -      "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": {
      -            "description": "True when the excerpt is cut short. It is never the whole section.",
      -            "type": "boolean"
      -          },
      -          "heading": {
      -            "type": "string"
      -          },
      -          "kind": {
      -            "description": "text: an excerpt of the section's own words. subsection_list: the section has no text of its own and `excerpt` lists its subsections. empty: no text.",
      -            "enum": [
      -              "text",
      -              "subsection_list",
      -              "empty"
      -            ],
      -            "type": "string"
      -          },
      -          "section_number": {
      -            "type": "string"
      -          },
      -          "source_url": {
      -            "description": "Link to the full section. Always show it to the user.",
      -            "type": [
      -              "string",
      -              "null"
      -            ]
      -          }
      -        },
      -        "required": [
      -          "document_title",
      -          "section_number",
      -          "heading",
      -          "citation",
      -          "source_url",
      -          "kind",
      -          "excerpt",
      -          "excerpt_truncated"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "message": {
      -      "description": "Guidance when status is not_found or error.",
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "query": {
      -      "properties": {
      -        "code_edition": {
      -          "enum": [
      -            "current",
      -            "2022",
      -            "2019"
      -          ],
      -          "type": "string"
      -        },
      -        "jurisdiction": {
      -          "type": "string"
      -        },
      -        "section": {
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "section",
      -        "jurisdiction",
      -        "code_edition"
      -      ],
      -      "type": "object"
      -    },
      -    "status": {
      -      "description": "found: at least one section matched. not_found: nothing matched — do NOT paraphrase a section that was not returned. error: the lookup could not run.",
      -      "enum": [
      -        "found",
      -        "not_found",
      -        "error"
      -      ],
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "status"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "ambiguous": {
      +      "description": "True when the number exists in more than one code. Pick by the code the user named and say which one you used; never merge them.",
      +      "type": "boolean"
      +    },
      +    "applied_question_url": {
      +      "description": "Where to send a user whose real question is whether a specific project complies.",
      +      "type": "string"
      +    },
      +    "as_of": {
      +      "description": "The date the codes were read as of (YYYY-MM-DD), or null for the current edition.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "browse_url": {
      +      "type": "string"
      +    },
      +    "historical": {
      +      "description": "True when this is NOT the current code. Say so to the user.",
      +      "type": "boolean"
      +    },
      +    "matches": {
      +      "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": {
      +            "description": "True when the excerpt is cut short. It is never the whole section.",
      +            "type": "boolean"
      +          },
      +          "heading": {
      +            "type": "string"
      +          },
      +          "kind": {
      +            "description": "text: an excerpt of the section's own words. subsection_list: the section has no text of its own and `excerpt` lists its subsections. empty: no text.",
      +            "enum": [
      +              "text",
      +              "subsection_list",
      +              "empty"
      +            ],
      +            "type": "string"
      +          },
      +          "section_number": {
      +            "type": "string"
      +          },
      +          "source_url": {
      +            "description": "Link to the full section. Always show it to the user.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "document_title",
      +          "section_number",
      +          "heading",
      +          "citation",
      +          "source_url",
      +          "kind",
      +          "excerpt",
      +          "excerpt_truncated"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "message": {
      +      "description": "Guidance when status is not_found or error.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "query": {
      +      "properties": {
      +        "code_edition": {
      +          "enum": [
      +            "current",
      +            "2022",
      +            "2019"
      +          ],
      +          "type": "string"
      +        },
      +        "jurisdiction": {
      +          "type": "string"
      +        },
      +        "section": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "section",
      +        "jurisdiction",
      +        "code_edition"
      +      ],
      +      "type": "object"
      +    },
      +    "status": {
      +      "description": "found: at least one section matched. not_found: nothing matched — do NOT paraphrase a section that was not returned. error: the lookup could not run.",
      +      "enum": [
      +        "found",
      +        "not_found",
      +        "error"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds real value beyond that by stating exactly what comes back (official text with citation, edition, and a link to the full section) and by drawing a hard boundary that it returns code text only and does not judge project compliance.

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?

Three sentences, front-loaded with purpose then trigger then scope limitation. The code-family enumeration is long but functional, and every clause earns its place by defining what can be looked up.

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?

With no output schema, the description correctly compensates by describing the return payload (official text, citation, edition, link). It covers jurisdiction scoping, edition selection, and the compliance boundary, leaving no obvious gap for invoking the tool correctly.

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%, including the section-number format with examples, the edition enum rationale, and jurisdiction slug examples, so the baseline is 3. The description adds nothing about parameter syntax or format beyond what the schema already documents ('by its section number').

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 and resource (look up verbatim text of a California code section) and enumerates the code families covered (building, residential, fire, plumbing, mechanical, CALGreen, energy, existing-building, plus local zoning ordinances). The 'by its section number' phrasing implicitly separates it from the sibling search/list tools, so an agent can route without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger with worked examples of citations ('CRC R602.10.2.3', 'CBC 1004', '§ 17.60.090') and an explicit scope exclusion: it does not determine project compliance. It stops short of naming the sibling tools (search_california_codes, list_california_code_documents) as the alternative for topic-based or browsing queries, so routing between siblings still requires inference.

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