Skip to main content
Glama

tdir_build_mapping_plan

Build a document mapping plan by resolving effective specs, matching source sections to target slots, routing media to attachments, and previewing early-stop solver stages.

Instructions

Resolve effective document specifications (UserSpecOverrideIR > TargetDocumentSpecIR > SourceDocumentSpecIR), build section-to-slot and media-to-attachment mappings, and preview MinimumInvasionElasticSolver Early-Stop stages.

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": {
      "job_id": "<job_id>"
    },
    "name": "tdir_build_mapping_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYes
user_constraintsNoExplicit user or target specification overrides (Priority 1 > Target Template > Source File). Any omitted field automatically inherits from the target template or source document.
user_spec_overridesNoExplicit user or target specification overrides (Priority 1 > Target Template > Source File). Any omitted field automatically inherits from the target template or source document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does disclose meaningful internal behavior: the three-tier spec resolution order and the three analytical stages (spec resolution, mapping construction, Early-Stop preview). However, it says nothing about side effects (is the plan persisted or purely previewed?), idempotency, cost of running the solver preview, or any permission requirements, which are critical for a multi-stage planning tool.

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?

It is a single tightly packed sentence that front-loads the main action and uses no filler. The trade-off is density: heavy internal jargon (IR suffix types, MinimumInvasionElasticSolver, Early-Stop) is stacked without any gloss, which reduces readability even though word count is low.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex, multi-stage tool with no annotations and no output schema, the description leaves too much out: what the "preview" actually returns, whether the resulting plan is stored for later execution, how the duplicated override parameters interact, and what happens to sections or media that fail to map. An agent cannot confidently invoke this without opening the schema and guessing.

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 67%, so the schema documents most fields itself. The description adds no parameter-level meaning at all, and it notably fails to disambiguate the two structurally identical objects, user_constraints and user_spec_overrides, which carry identical descriptions in the schema and are the primary source of caller confusion here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs and resources: resolve effective document specifications with an explicit precedence chain (UserSpecOverrideIR > TargetDocumentSpecIR > SourceDocumentSpecIR), build section-to-slot and media-to-attachment mappings, and preview MinimumInvasionElasticSolver Early-Stop stages. That is far more specific than a tautology, but it never distinguishes this planning step from siblings like tdir_execute_conversion or tdir_adjust_block_layout, so an agent must infer the difference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance, no statement of prerequisites beyond the required job_id, and no named alternatives. The word "preview" hints that this is a pre-execution planning step, but the agent is left to infer that it precedes tdir_execute_conversion rather than being told.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.