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

NameRequiredDescriptionDefault
codeNoOptional. The code the user named, so a number that exists in several codes returns the right one. An abbreviation or a name: "CBC", "CRC", "CFC", "CMC", "CPC", "CEC", "CEBC", "CALGreen", "CHBC", "California Fire Code". Omit when the user gave no code name.
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.

Output Schema

NameRequiredDescriptionDefault
as_ofNoThe date the codes were read as of (YYYY-MM-DD), or null for the current edition.
queryNo
statusYesfound: at least one section matched. not_found: nothing matched — do NOT paraphrase a section that was not returned. error: the lookup could not run.
matchesNo
messageNoGuidance when status is not_found or error.
ambiguousNoTrue 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.
browse_urlNo
historicalNoTrue when this is NOT the current code. Say so to the user.
applied_question_urlNoWhere to send a user whose real question is whether a specific project complies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / code
      Added value: +{
      +  "description": "Optional. The code the user named, so a number that exists in several codes returns the right one. An abbreviation or a name: \"CBC\", \"CRC\", \"CFC\", \"CMC\", \"CPC\", \"CEC\", \"CEBC\", \"CALGreen\", \"CHBC\", \"California Fire Code\". Omit when the user gave no code name.",
      +  "type": "string"
      +}
    • 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": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "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"
      +}
  2. 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
  3. 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"
      +}
  4. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false and destructiveHint=false, so the safety profile is covered. The description adds genuine scope context beyond that: it returns verbatim official text with citation and edition, and explicitly does not render compliance judgments. The remaining behavioral gap (truncation/pagination of long sections) is minor.

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

Conciseness4/5

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

Three sentences, front-loaded with the verb and resource, then the trigger condition, then the scope boundary. The long code-family enumeration costs some length but earns it by improving matching on user citations; no filler sentences.

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 an output schema present, return-format detail is not required, and the description still summarizes it (text + citation + edition + link). Annotations cover safety, schema covers all four parameters, and the description covers trigger conditions and the compliance-limitation boundary. Nothing an agent needs to call this correctly is missing.

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% and every parameter is documented there, including the code abbreviations, edition enum semantics and jurisdiction slugs, so the baseline is 3. The description largely restates what the schema already says ('by its section number', naming code families) rather than adding new parameter meaning.

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 (look up) and resource (verbatim California code section) and enumerates the exact code families covered, including city/county ordinances. The 'by its section number' framing cleanly separates it from the sibling search_california_codes and list_california_code_documents 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 Guidelines4/5

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

Gives an explicit trigger ('use this whenever the user cites a section number' with concrete citation examples) plus a scope exclusion ('does not determine whether a specific project complies'). It never names the sibling tools as alternatives for the non-section-number case, so routing to search/list is left to 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