Skip to main content
Glama

check_document_attachments

Read-onlyIdempotent

List a document's attachments and verify an attachment ID belongs to that document and its stored bytes can be opened with current access.

Instructions

List attachments on a readable document. Supply attachmentId to verify that this attachment belongs to the document and that its stored bytes can be opened with the current access.

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": {
      "documentId": "<documentId>"
    },
    "name": "check_document_attachments"
  }
}

Input Schema

NameRequiredDescriptionDefault
documentIdYesUUID returned by the corresponding list or read operation.
workspaceIdNoWorkspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.
attachmentIdNoUUID returned by the corresponding list or read operation.

Output Schema

NameRequiredDescriptionDefault
itemsYes
verificationNo
verifiedAttachmentIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.2.2
    • addedOutput schema / properties / items / items / properties / documentId
      Added value: +{
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
    • addedOutput schema / properties / verification
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "mimeType": {
      +      "type": "string"
      +    },
      +    "sha256": {
      +      "pattern": "^[a-f0-9]{64}$",
      +      "type": "string"
      +    },
      +    "size": {
      +      "exclusiveMinimum": 0,
      +      "maximum": 9007199254740991,
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "size",
      +    "mimeType",
      +    "sha256"
      +  ],
      +  "type": "object"
      +}
  2. Addedv2.1.9

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds real context beyond them: an access precondition ("readable document") and the fact that attachmentId triggers a two-part check of ownership and byte openability. It says nothing about failure or error behavior, which keeps it at 4 rather than 5.

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, front-loaded with the primary behavior, then the optional mode. No filler and nothing that duplicates structured fields.

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 full schema coverage, complete annotations, and an output schema, the remaining burden on the description is small and it is met: the agent knows the access precondition, both operating modes, and what the optional parameter is for.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline would be 3, but the description goes further by explaining what attachmentId actually does semantically — it switches the call from listing to membership-and-openability verification — which the schema's generic "UUID returned by the corresponding list or read operation" does not convey.

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 ("List attachments on a readable document") and adds a second, clearly delimited mode ("Supply attachmentId to verify..."). An agent can tell this apart from read_document or upload_document_image without inspecting the schema.

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?

The description gives the condition that selects the verification mode (supplying attachmentId) and the precondition for the list mode (the document must be readable). It does not explicitly name a sibling tool as an alternative or state when not to use this, so it stops short of full routing guidance.

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