Skip to main content
Glama

Add document

add_document

Attach a document metadata record to a ticket. The file itself must be uploaded to Supabase Storage separately; pass the resulting URL as file_url.

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": {
      "ticket_id": "<ticket_id>",
      "file_name": "<file_name>"
    },
    "name": "add_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNoOptional notes about the document
file_urlNoPublic or signed URL to the stored file
file_nameYesOriginal file name (e.g. report.pdf)
file_sizeNoFile size in bytes
mime_typeNoMIME type (e.g. application/pdf, image/png)
ticket_idYesTicket UUID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), so safety is covered. The description adds the meaningful behavioral detail that only a metadata record is created and no file is transferred. It does not address non-idempotency (duplicate records on repeat calls) despite the annotation flagging it, which is a notable omission for a create operation.

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?

Two sentences, zero filler, with the core action stated first and the prerequisite workflow immediately after. Every clause carries operational information the agent needs.

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 mutation with no output schema, the description covers the essential non-obvious workflow (external upload first) and the metadata-only scope. It leaves the return value (e.g. a created document id) and duplicate-handling behavior unspecified, which an agent might need before chaining calls.

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%, so the baseline is 3, and the description earns an increment by explaining the provenance of file_url — it must be the URL produced by a separate storage upload. The other five parameters (ticket_id, file_name, file_size, mime_type, notes) are left entirely to the schema.

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?

The description gives a specific verb and resource ('Attach a document metadata record to a ticket') and crucially disambiguates the action as metadata-only rather than a file upload. It does not explicitly contrast with siblings such as add_image_to_document or update_document, so it stops short of full sibling differentiation.

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 a clear prerequisite and ordering constraint: the file must be uploaded to Supabase Storage separately and the resulting URL passed as file_url. That tells the agent what must happen before the call, but there is no guidance on when to prefer this tool over a sibling or what not to use it for.

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