Skip to main content
Glama

resolve_contract_file

Destructive

Fetch a bridge-LINKED contract file on demand (Ticket T3). A document imported with modus 'referenz' holds only a link (source_meta.kind='bridge') and no bytes, so get_document_link / analyze_document have nothing to serve. This re-fetches the original through the bridge into the document store (sets its storage_path + file_size) so it can then be opened or analysed; the link metadata stays, and a later re-import resets it to a reference. If the document already has bytes it returns them unchanged. Required: document_id (a contract document, from list_documents / get_document). The bridge named in the link must be reachable.

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": {
      "document_id": "<document_id>"
    },
    "name": "resolve_contract_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
document_idYesID of the document

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / document_id / description
      Added value: +"ID of the document"
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the annotations it discloses real side effects: re-fetching the original through the bridge, writing storage_path and file_size, preserving link metadata, and that a later re-import resets it back to a reference. It also states an external precondition (the bridge must be reachable). Minor tension exists with idempotentHint=false given the "returns them unchanged" no-op behavior, but that is a nuance rather than a contradiction of destructiveHint=true, since the tool does mutate stored state.

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?

Front-loaded with the action and its scope, then the rationale and side effects; nearly every clause carries information. It is somewhat dense and the second sentence is long, but no filler sentences are present.

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 one-parameter, no-output-schema mutation behind a bridge, the description covers preconditions, state changes, and persistence well. The only remaining gap is what the caller receives (document metadata vs. bytes) after a successful re-fetch, which is not stated.

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% and the single parameter is already documented, so the baseline is met. The description adds value by constraining the ID to "a contract document" and naming the tools that produce it (list_documents / get_document), which the schema's generic "ID of the document" does not.

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?

States a specific verb and resource ("Fetch a bridge-LINKED contract file on demand") and immediately scopes what kind of document it applies to (imported with modus 'referenz', source_meta.kind='bridge'). It explicitly distinguishes itself from get_document_link and analyze_document by explaining that those have "nothing to serve" for such documents, which no sibling name alone would convey.

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?

Names the exact triggering condition (a link-only document with no bytes) and the alternatives that fail in that case, then adds a when-not condition: "If the document already has bytes it returns them unchanged." It also states the ID source (list_documents / get_document), so an agent knows both when to call and what to pass.

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.