Skip to main content
Glama

list_categories

Read-onlyIdempotent

Lists categories under one subdomain, with the parent domain and subdomain names. This is the third taxonomy step.

When to use: When you already have a subdomain_id from list_subdomains. Examples: 'categories under subdomain A.1', 'find a category named jurisdiction'. Pass category_name only to narrow by name. When not: Do not use this for subcategories; use list_subcategories with the returned category_id. Do not use it for law types; use list_law_types. For the parent lists use list_domains and list_subdomains. For documents use list_documents or search. Do not call without a subdomain_id from list_subdomains. Skip if you already have this category list for the same subdomain_id and category_name.

Parameters: subdomain_id is the subdomain reference from list_subdomains, such as A.1. A call without it, or with an unknown value, returns Subdomain not found. category_name is an optional case-insensitive substring of the category name; the parameter is category_name, not category. limit defaults to 20 and is capped at 100. next_id is the numeric id from pagination.next_id, not category_id. Empty data means that subdomain has no matching category.

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 category table. total_count is the full match count, not the page size. The input marks subdomain_id optional, but the query returns Subdomain not found when it is missing.

Returns: A page of {id, domain, subdomain, category_id, category_name}. domain and subdomain are display names, not reference codes. Example category_id "A.1.1", category_name "General Private International Law". Pass category_id, not id, to list_subcategories.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_categories"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of results to return
next_idNoNext ID to paginate the results
subdomain_idNoFilter by Subdomain ID
category_nameNoFilter by category name

Output Schema

NameRequiredDescriptionDefault
dataYesCategories in the requested subdomain 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": "Categories in the requested subdomain that have data; empty if none match.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "category_id": {
      +            "description": "Category reference, such as A.1.1. Pass this to list_subcategories as category_id.",
      +            "type": "string"
      +          },
      +          "category_name": {
      +            "description": "Category display name, or null when unset",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "domain": {
      +            "description": "Parent domain display name, not the domain reference",
      +            "type": "string"
      +          },
      +          "id": {
      +            "description": "Numeric row id. Use only as pagination.next_id, not as category_id.",
      +            "type": "number"
      +          },
      +          "subdomain": {
      +            "description": "Parent subdomain display name, not the subdomain reference",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "domain",
      +          "subdomain",
      +          "category_id",
      +          "category_name"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "message": {
      +      "description": "Result message",
      +      "type": "string"
      +    },
      +    "pagination": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "limit": {
      +          "description": "Maximum number of categories 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 categories",
      +          "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 the safety profile (readOnly, idempotent, non-destructive), and the description adds substantive context beyond them: OAuth/Bearer auth with 401 failure modes, no MCP-layer rate limits, retry safety, no caching, and the notable quirk that subdomain_id is schema-optional but returns 'Subdomain not found' if omitted. It also discloses total_count semantics and that empty data is a valid 'no match' result rather than an error.

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?

Content is front-loaded and organized into When to use / Parameters / Behavior / Returns blocks, and nearly every sentence carries operational value. It runs long and the Returns block partly restates the output schema, but the category_id example and the 'pass category_id, not id, to list_subcategories' note justify its presence.

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 list tool with an output schema, everything an agent needs is present: preconditions, error behavior, pagination mechanics, return field meanings (display names vs. reference codes), and cross-tool handoff. No material gaps remain.

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?

With 100% schema coverage the baseline is 3, but the description adds real meaning: subdomain_id format example (A.1), category_name is a case-insensitive substring and is explicitly not named 'category', limit defaults to 20 and caps at 100, and next_id is the numeric pagination.next_id rather than category_id. These corrections prevent the most likely invocation mistakes.

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 categories under one subdomain') plus what is included (parent domain and subdomain names) and situates it as 'the third taxonomy step'. It is clearly distinguishable from siblings like list_subdomains and list_subcategories, which are named explicitly.

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 explicit when-to-use with a precondition ('When you already have a subdomain_id from list_subdomains'), concrete example phrasings, and explicit when-not routing to list_subcategories, list_law_types, list_domains, list_subdomains, list_documents and search. It even adds a skip condition for repeat calls with identical arguments.

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.