Skip to main content
Glama

list_law_types

Read-onlyIdempotent

Lists law types under one subcategory, with the parent category and subcategory names. This is the last taxonomy step. It does not return documents.

When to use: When you already have a subcategory_id from list_subcategories. Examples: 'law types under subcategory A.1.1.1', 'find law types named statute'. Pass law_type only to narrow by name. When not: Do not use this to list subcategories, categories, domains, or documents. For those use list_subcategories, list_categories, list_domains, list_documents, or search. Do not call without a subcategory_id from list_subcategories. Skip if you already have this law type list for the same subcategory_id and law_type filter.

Parameters: subcategory_id (required) is the subcategory reference from list_subcategories. It must be exactly four dot-separated segments, such as A.1.1.1, and is uppercased before the query. law_type is an optional case-insensitive substring of the law type name. A subcategory_id with the wrong shape is rejected before the query. limit defaults to 20 and is capped at 100. next_id is the numeric id from pagination.next_id, not subcategory_id. Empty data means that subcategory has no matching law type.

Behavior: Read-only SELECT; does not create, update, or delete records, files, or credentials. The only effect is a database read. Auth: tools/call requires OAuth 2.0 or a Bearer token (401 if missing, invalid, revoked, or no active subscription). Rate limits: none at the MCP layer; safe to retry. Not cached; each call reads the current law type table. total_count is the full match count, not the page size. There is no further taxonomy tool after this one.

Returns: A page of {id, category_id, category_name, subcategory_id, subcategory_name, law_type_id, law_type}. id and law_type_id are the same numeric id. Example law_type "Statute".

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": {
      "subcategory_id": "<subcategory_id>"
    },
    "name": "list_law_types"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of results to return
next_idNoNext ID to paginate the results
law_typeNoFilter by law type name
subcategory_idYesFilter by Subcategory ID

Output Schema

NameRequiredDescriptionDefault
dataYesLaw types in the requested subcategory that have data; empty if none match.
messageYesResult message
paginationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / next_id
      Added value: +{
      +  "description": "Next ID to paginate the results",
      +  "type": "number"
      +}
    • removedInput schema / properties / offset
      Removed value: -{
      -  "description": "Number of results to skip",
      -  "type": "number"
      -}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "description": "Law types in the requested subcategory that have data; empty if none match.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "category_id": {
      +            "description": "Parent category reference, such as A.1.1",
      +            "type": "string"
      +          },
      +          "category_name": {
      +            "description": "Parent category display name",
      +            "type": "string"
      +          },
      +          "id": {
      +            "description": "Numeric law type id, same value as law_type_id. Use as pagination.next_id.",
      +            "type": "number"
      +          },
      +          "law_type": {
      +            "description": "Law type display name, or null when unset",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "law_type_id": {
      +            "description": "Numeric law type id, same value as id",
      +            "type": "number"
      +          },
      +          "subcategory_id": {
      +            "description": "Parent subcategory reference, such as A.1.1.1",
      +            "type": "string"
      +          },
      +          "subcategory_name": {
      +            "description": "Parent subcategory display name",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "category_id",
      +          "category_name",
      +          "subcategory_id",
      +          "subcategory_name",
      +          "law_type_id",
      +          "law_type"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "message": {
      +      "description": "Result message",
      +      "type": "string"
      +    },
      +    "pagination": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "limit": {
      +          "description": "Maximum number of law types returned",
      +          "type": "number"
      +        },
      +        "next_id": {
      +          "description": "Cursor ID for the next page, or null when there is no next page",
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "total_count": {
      +          "description": "Total number of matching law types",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "total_count",
      +        "limit",
      +        "next_id"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "message",
      +    "data"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, and the description adds genuine context beyond them: SELECT-only with no side effects, OAuth/Bearer auth with 401 failure modes, no MCP-layer rate limits, safe to retry, and no caching so each call reads current data. Pagination semantics (total_count is full match count, next_id is pagination.next_id) are also disclosed.

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?

Well front-loaded and sectioned (When to use / When not / Parameters / Behavior / Returns), but it is on the long side, and since an output schema exists the Returns section is largely redundant. A few lines, such as 'It does not return documents' and 'There is no further taxonomy tool after this one', restate adjacent points.

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?

For a four-parameter filtered list tool the definition covers prerequisites, parameter formats, auth, pagination, and empty-result interpretation. Nothing an agent needs in order to call it correctly is missing, and output structure is already handled by the output schema.

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

Parameters5/5

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

Schema coverage is 100%, so a 3 would be baseline, but the description adds real meaning: subcategory_id must be exactly four dot-separated segments, is uppercased pre-query, and is rejected on wrong shape; law_type is a case-insensitive substring; limit defaults to 20 and caps at 100; next_id is explicitly disambiguated from subcategory_id.

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 ('Lists law types under one subcategory') plus the scope boundary ('does not return documents') and positions itself as the terminal taxonomy step. An agent can distinguish it from list_subcategories or search without opening any 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?

Explicit when-to-use with a prerequisite (must already hold subcategory_id from list_subcategories), concrete example phrasings, and an explicit when-not list naming the correct alternatives (list_subcategories, list_categories, list_domains, list_documents, search). It even adds a skip condition for redundant repeat calls.

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.