Skip to main content
Glama

List mapping rules

layerz_list_mappings
Read-only

List the import classification rules in scope for a model. Each mapping set is labeled with a scope: model (this model's own rules), system_template (the curated country catalogs — PCG, US GAAP, UK, SKR03/04), or user_template (your reusable catalogs). A model classifies ONLY with its own model rules — catalogs and templates apply by being imported (see layerz_import_mapping_template), never implicitly (a pre-cutover account source may still classify through the legacy PCG overlay until its next sync materializes those rules into the model set). A pattern is a case-insensitive GLOB where * matches anywhere: 641* (prefix), *PERPLEXITY* (contains), *641 (suffix), or exact 601000 (no *). The default result == what the importer actually applies; pass include_user_mappings: true to ALSO surface your account-wide catalogs for discovery. Pass include_coverage: true to add, per rule, the count of staged transactions it matches (match_count) plus a coverage block (auto-created count + the top unrouted keys) — the actionable input for writing rules. templates lists the catalogs you can fork. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_idNoTarget model UUID. Required for user-scoped API keys; ignored (or validated against scope) for model-scoped keys.
include_coverageNoAlso 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.
include_user_mappingsNoAlso 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).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses meaningful runtime behavior: case-insensitive GLOB semantics, default results matching what the importer actually applies, the heavier cost of coverage computation, and the legacy PCG overlay caveat. This gives the agent a much richer understanding of edge cases and side effects than annotations alone.

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?

The description is dense but every sentence carries operational meaning, and the core purpose is front-loaded. The length is justified by the tool's nuanced scope model and optional flags, with no filler or repetition.

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 present, the description compensates by explaining the returned concepts: sets/mappings with scopes, templates, match_count, and coverage block. For a nuanced read-only tool with three optional parameters, it supplies everything an agent needs to call it correctly.

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?

Although the schema already describes all three parameters, the description adds significant meaning: it explains GLOB matching patterns, clarifies that include_user_mappings surfaces account-wide catalogs, and defines what the coverage block contains. This materially improves parameter understanding beyond the structured 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 first sentence names a specific verb and resource ('List the import classification rules in scope for a model') and clearly differentiates the three mapping-set scopes. This distinguishes it from sibling mapping mutation/import tools like layerz_set_mapping and layerz_import_mapping_template.

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?

The description explains when to use the tool and when not to: a model classifies only with its own model rules, and catalogs/templates apply by being imported via layerz_import_mapping_template, never implicitly. It also gives precise conditions for enabling include_user_mappings and include_coverage, so an agent knows exactly when to request the optional behavior.

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