Skip to main content
Glama

explain_prediction

Shows why a contract clause type received its score: view the sentences and words or word pairs that raised or lowered the prediction, plus the clause type's top-weighted terms overall.

Instructions

Why the model scored one clause type as it did in one agreement: its best sentences with the words and word pairs that pushed the score up (and down) the most, and the clause type's top-weighted terms overall.

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": {
      "path": "<path>",
      "clause_type": "<clause_type>"
    },
    "name": "explain_prediction"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
clause_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations, so the description carries the full burden. It does usefully disclose the shape of the answer (up- and down-pushing words/pairs, plus global top-weighted terms), which is more than most tools offer. However, it says nothing about read-only vs. mutating behavior, compute cost, failure modes for an unknown path or clause type, or whether the model must already be trained.

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?

A single sentence, front-loaded with the purpose before the payload detail, with no filler. It is dense but each clause adds real information about what the explanation returns.

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

Completeness3/5

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

With no output schema, the description does a decent job of describing the return contents. But for a two-parameter, zero-coverage, annotation-free tool, missing parameter definitions and any mention of preconditions leave an agent guessing before it can call it correctly.

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

Parameters2/5

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

Schema coverage is 0% and both parameters are required, so the description must compensate. It does imply that 'path' identifies the one agreement and 'clause_type' selects the one clause type, but leaves 'path' ambiguous (file path? corpus identifier? relative to what?) and never hints at valid clause_type values, which the list_clause_types sibling suggests is a closed vocabulary.

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?

States a specific verb and resource: explains why the model scored one clause type in one agreement, and enumerates what the explanation contains (best sentences, influential words and word pairs, top-weighted terms). It is distinguishable from extract_key_terms and list_clause_types by the 'why the model scored' framing, though it never names or contrasts those siblings.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer this is the tool to reach for when it needs the reasoning behind a score, not raw terms or a list of types. There is no explicit when-to-use, no prerequisite (e.g., a trained model or an agreement already indexed under the given path), and no statement of when not to use it.

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