Skip to main content
Glama

Diagnose what happened to an extraction

datasheetvend_diagnose_extraction
Read-onlyIdempotent

Explain what happened to an extraction, module by module, from recorded state. Keep the outcomes apart: never_requested (not asked for, not a failure), nothing_found (ran; the datasheet does not document it), needs_review, still_running and failed (a recorded error). When failureReason is present, lead with whose problem it is (our_infrastructure means re-running is worth it). Quote the recorded reason, never invent one; if unexplained is true, say nothing was recorded. Recorded error messages longer than 500 characters are cut (errorMessagesCut). Reads the recorded state of your account's own jobs (owner, or TEAM-shared in your workspace; a refunded job is refused): nothing is extracted and no model is called. Costs no credits. Needs a DatasheetVend API key.

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

Input Schema

NameRequiredDescriptionDefault
job_idYesAn extraction job in your account.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world behavior, so the bar is lower, yet the description adds substantial context: the outcome taxonomy semantics (never_requested vs nothing_found vs failed), failureReason blame attribution, the 500-character errorMessagesCut truncation, unexplained handling, ownership/refund refusal, zero credit cost, and API key requirement. The one gap is that it doesn't say whether the module breakdown is bounded or paginated.

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 directive is front-loaded in the first sentence, followed by ordered caveats (outcome labels, failureReason, quoting rules, truncation, access scope, cost, auth). Dense but every sentence carries operational information; nothing repeats the schema or annotations.

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, the description carries the burden of explaining return semantics and does so: it enumerates the outcome values, names failureReason, unexplained, and errorMessagesCut, and explains how to phrase results honestly. For a single-parameter read tool this is complete.

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 100% for the single job_id parameter, so the baseline is 3. The description goes beyond the schema's 'an extraction job in your account' by specifying that owner or TEAM-shared jobs in the workspace are accepted and that a refunded job is refused — directly useful for selecting a valid identifier.

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: explain what happened to an extraction, module by module, from recorded state. It also distinguishes itself from the extract_* siblings by asserting 'nothing is extracted and no model is called', though no sibling is named directly, which keeps it short of a 5.

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 implied (inspect a job's recorded outcome after the fact) and reinforced by constraints: it reads only your own or TEAM-shared jobs, refuses refunded jobs, and costs no credits. There is no explicit statement of when to choose this over compare_extractions or explain_warnings, so guidance stays at the implied level.

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