Skip to main content
Glama

Find fields in the PDF

detect_fields
Read-onlyIdempotent

Reads a DRAFT agreement's PDF for the fields it asks for: text anchors such as {{signature:key}}, DocuSign-style tags such as \s1, the PDF's own form fields, and printed labels such as "Signature: ____". Says which fields it would place for which recipient, and lists every tag it could not use (with its page) so the person can fix it. A suggestion only: nothing is saved, and the person places or accepts fields in the console. Refuses anything that is not a draft, and an anchor naming a role no recipient has.

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": {
      "agreementId": "<agreementId>"
    },
    "name": "detect_fields"
  }
}

Input Schema

NameRequiredDescriptionDefault
agreementIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and non-destructive, and the description reinforces this with 'nothing is saved' plus concrete refusal behavior and the structure of what it reports back (per-recipient placements, unusable tags with page numbers). It adds real context beyond the annotations but doesn't cover performance or error handling on malformed/unreadable PDFs.

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?

Three tight sentences, front-loaded with the core action, then output behavior, then the read-only/refusal caveats. No filler or repetition of the title.

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 read-only tool with no output schema, the description covers what is detected, what is reported, and what is refused, which is nearly everything an agent needs. Only the exact return shape and behavior on large or unusual PDFs remain unstated.

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 coverage is 0% for the single agreementId parameter, so the description has to carry the meaning. It implies the agreement must be a draft and that the PDF is derived from it, but never explicitly ties agreementId to the input or notes constraints such as draft-only IDs.

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 uses a specific verb and resource ('Reads a DRAFT agreement's PDF for the fields it asks for') and then enumerates the four detection sources (text anchors, DocuSign-style tags, native form fields, printed labels). An agent knows exactly what the tool produces and how it differs from siblings like read_agreement_text.

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 gives a clear precondition (must be a draft) and an explicit refusal case (anchors naming a role no recipient has), plus the workflow note that the person places fields in the console afterwards. It stops short of naming an alternative tool for non-draft agreements, so it doesn't reach a 5.

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