Skip to main content
Glama

Open a document

open_document

Opens a document from a filesystem path or SharePoint/OneDrive URL, registering it and returning its inspection in a single call instead of two separate steps.

Instructions

Open a document the user named by source: registers it and returns its inspection in one call - use this instead of register_document followed by inspect_document. source is connection-specific, exactly as for register_document: a path under a filesystem connection's root, or a SharePoint/OneDrive URL or 'driveId/itemId' pair. Returns {connectionId, documentId, name, contentType, version} followed by the inspect_document payload (snapshot, outline, paragraphs, contentControls, nodes, styles). Keep documentId for follow-up calls; paging works as in inspect_document.

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": {
      "connectionId": "<connectionId>",
      "source": "<source>",
      "fidelity": "<fidelity>",
      "paragraphOffset": "<paragraphOffset>",
      "paragraphLimit": "<paragraphLimit>",
      "sheetId": "<sheetId>",
      "range": "<range>",
      "maximumCells": "<maximumCells>"
    },
    "name": "open_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
rangeYes
sourceYes
sheetIdYes
fidelityYescontent
connectionIdYes
maximumCellsYes
paragraphLimitYes
paragraphOffsetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and idempotentHint=false, and 'registers it' is consistent with that mutation/side-effect profile. The description adds real behavioral context beyond the annotations: source forms are connection-specific, the return fields are enumerated, documentId must be retained, and paging delegates to inspect_document semantics. It does not note whether re-opening the same source is a no-op or duplicates a registration.

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?

Dense and front-loaded: the composite purpose and the sibling alternative come first, then source format, then return shape and follow-up guidance. Every sentence carries information, though it is on the long side for a single opening call.

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?

With no output schema, the description correctly enumerates the returned {connectionId, documentId, name, contentType, version} and references the inspect_document payload. Combined with the sibling pointer, an agent has enough to call it, though the unexplained spreadsheet/section parameters leave a gap for non-prose documents.

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% across 8 parameters, so the description carries the burden. It explains source in depth (filesystem path under the connection root, SharePoint/OneDrive URL or driveId/itemId pair) and links paragraph paging to inspect_document, but fidelity, sheetId, range, and maximumCells receive no explanation at all.

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?

Specific verb and resource ('open a document'), plus the precise composite behavior: it registers the document and returns its inspection in one call. It explicitly distinguishes itself from the register_document + inspect_document siblings, so an agent can route without opening either schema.

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?

'use this instead of register_document followed by inspect_document' is an explicit alternative with the condition that selects it. The only unstated case is when to prefer register_document alone, but the relevant routing decision is fully covered.

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