Skip to main content
Glama

List mapping rules

layerz_list_mappings
Read-onlyIdempotent

Lists the import classification rules in scope for a model: sets (each with a scope: model = the model's own rules, system_template = the curated country catalogs (PCG, US GAAP, UK, SKR03/04), user_template = the reusable catalogs of the caller's workspaces), mappings (every effective rule: pattern → target item, sign, source scope; total counts them) and templates (the catalogs importable through layerz_manage_mapping { op: "import_template" }). A model classifies with its own model rules only; a catalog applies once imported. A pattern is a case-insensitive glob where * matches anywhere. include_user_mappings: true adds the catalogs of the caller's workspaces to sets / mappings; include_coverage: true adds per-rule match_count and a coverage block (auto-created count, ignored count, the top keys routing nowhere).

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": "layerz_list_mappings"
  }
}

Input Schema

NameRequiredDescriptionDefault
model_idNoTarget model UUID. Required for user-scoped API keys; validated against the bound model for model-scoped keys.
include_coverageNoAlso compute `match_count` per rule and a `coverage` block (classifies every source: heavier read).
include_user_mappingsNoAlso list the user catalogs of the caller's workspaces in `sets` / `mappings` (default: only what the model classifies with).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / include_user_mappings / description
      Previous value: -"Also list the account-wide user catalogs in `sets` / `mappings` (default: only what the model classifies with)."New value: +"Also list the user catalogs of the caller's workspaces in `sets` / `mappings` (default: only what the model classifies with)."
  2. Changed3 schema fields changed
    • changedInput schema / properties / include_coverage / description
      Previous value: -"Also compute, per rule, `match_count` (staged rows it captures) and a `coverage` block (auto-created count + top unrouted keys). Off by default — it classifies every source, so it is a heavier read."New value: +"Also compute `match_count` per rule and a `coverage` block (classifies every source: heavier read)."
    • changedInput schema / properties / include_user_mappings / description
      Previous value: -"Also surface your account-wide (model-independent) user catalogs in `sets`/`mappings` for discovery. Default false: only what this model actually classifies with (system + this-model rules)."New value: +"Also list the account-wide user catalogs in `sets` / `mappings` (default: only what the model classifies with)."
    • changedInput schema / properties / model_id / description
      Previous value: -"Target model UUID. Required for user-scoped API keys; ignored (or validated against scope) for model-scoped keys."New value: +"Target model UUID. Required for user-scoped API keys; validated against the bound model for model-scoped keys."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the tool as read-only, idempotent, closed-world, and non-destructive. The description adds meaningful behavior beyond annotations: `include_coverage` is a "heavier read," `include_user_mappings` expands the scope to workspace catalogs, and the return sections are described in detail.

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?

The description is front-loaded with the core purpose and then organized around returned sections and flags. It is dense and somewhat long, but the detail is relevant for a tool without an output schema and no sentence is clearly wasted.

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?

Without an output schema, the description carries the full burden of explaining the returned shape, and it does so thoroughly: `sets`, `mappings`, `templates`, scope meanings, pattern glob behavior, and optional coverage fields. That is sufficient for an agent to call and interpret this three-parameter read tool correctly.

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

Parameters4/5

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

Schema description coverage is 100%, so the parameters are already documented. The description still adds value by explaining that `include_user_mappings` adds catalogs to `sets`/`mappings` and that `include_coverage` adds `match_count` plus a coverage block with auto-created, ignored, and unrouted-key counts, though some of this overlaps with 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?

The description opens with a specific verb and resource: "Lists the import classification rules in scope for a model," then details the returned sections (`sets`, `mappings`, `templates`) and their scope semantics. It clearly distinguishes model-owned rules from templates and references `layerz_manage_mapping` for catalog imports.

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?

The description gives a clear context for use: inspecting effective rules, understanding scope, and optionally checking coverage; it also points to `layerz_manage_mapping { op: "import_template" }` for importing catalogs. However, it does not explicitly state when to choose this tool over `layerz_manage_mapping` or `layerz_list_templates`, leaving some alternative routing implicit.

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