Skip to main content
Glama

explain

Identify which past orders a model's prediction depends on by hiding candidate rows and re-asking the model; use the returned ID with verify before presenting them as reasons.

Instructions

Find the past orders that the model's prediction seems to rest on (the precedents).

Takes the most similar past orders as candidates, repeatedly hides a random half and re-asks the model, then scores each candidate by how much it raises the model's confidence. Slow: roughly one minute on a GPU with the defaults. The result is UNVERIFIED; call verify with the returned explanation_id before presenting the precedents as the reason.

Args: order_id: index of a held-out order. fields: field values for a new order, as an alternative to order_id. model: "fast" or "base". candidates: how many similar past orders to consider. rounds: hide-and-ask rounds; about three per candidate gives stable scores. top_k: how many precedents to return.

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

Input Schema

NameRequiredDescriptionDefault
modelNofast
top_kNo
fieldsNo
roundsNo
order_idNo
candidatesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the cost (~one minute on GPU with defaults), the stochastic method (repeatedly hides a random half and re-asks the model), and that output is unverified. It does not explicitly state read-only/non-mutating behavior or failure modes, but the operational profile an agent needs for planning is present.

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?

Purpose is front-loaded in the first sentence, followed by method, cost/trust caveats, and then a compact Args block. Given 0% schema coverage, the parameter list is necessary rather than padding, and no sentence is redundant.

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

Completeness4/5

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

For a six-parameter, annotation-free tool with no output schema, the description covers method, runtime, verification requirement, and each parameter. The main gap is the return shape: it mentions explanation_id and precedents but does not describe scores or what else comes back, which matters since no output schema exists.

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 coverage is 0%, so the description must compensate, and it documents all six parameters: order_id as a held-out order index, fields as an alternative input, model values 'fast' or 'base' (a hidden enum not in the schema), candidates, rounds with a useful heuristic (~three per candidate for stable scores), and top_k. It omits defaults and does not clarify whether order_id and fields are mutually exclusive or whether one is required despite zero required params.

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 — finding the past orders (precedents) a model's prediction rests on — and names the mechanism (occlusion of similar past orders). This is clearly distinguishable from siblings predict, verify, and list_orders: it explains a prediction rather than producing or checking one.

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?

It states explicitly that the result is UNVERIFIED and that verify must be called with the returned explanation_id before presenting precedents as the reason — a concrete workflow rule. It also explains order_id vs fields as alternatives. It stops short of naming when an agent should skip explain entirely (e.g., for a cheap pre-check), but the sequencing with verify is unambiguous.

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

Deploy Server

Other Tools