Skip to main content
Glama

Register a document

register_document

Registers an existing document with a configured connection, returning an opaque documentId. Provide a filesystem path or SharePoint URL; never pass credentials.

Instructions

Register an existing document with a host-configured provider connection and return its opaque documentId. source is connection-specific: for a filesystem connection, a path under its root; for a SharePoint connection, the document's SharePoint/OneDrive URL (e.g. 'https://contoso.sharepoint.com/:w:/s/…') or a 'driveId/itemId' pair (e.g. 'b!9a3f…/01ABCDEF'). Never pass credentials. Returns {connectionId, documentId, name, contentType, version}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
connectionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare the safety profile (readOnly=false, destructive=false, idempotent=false, openWorld=false); the description adds substantive behavior beyond them: the credential prohibition, the connection-specific interpretation of source, and the returned identifier shape. It does not address the non-idempotent flag, e.g. whether re-registering the same source creates a duplicate 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?

Purpose and return value are front-loaded in the first sentence, with format details following. It is dense but every sentence carries information; the one weakness is the long single-block format example that would read better broken out.

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 compensates by enumerating the return object ({connectionId, documentId, name, contentType, version}), and both required parameters are at least addressed. Missing pieces are edge behavior on re-registration and permission requirements, which an agent might still need before calling.

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 description coverage is 0%, so the description carries the full burden, and it does so well for `source` by giving per-connection-type formats with concrete examples (filesystem path, SharePoint URL, 'driveId/itemId' pair). `connectionId` is only implied via 'host-configured provider connection' — it never says where to obtain one, which keeps this from a 5.

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 names a specific verb and resource ('Register an existing document with a host-configured provider connection') and states the outcome ('return its opaque documentId'). It is unambiguous on its own, though it never contrasts itself with close siblings like open_document, inspect_document, or remove_document, which would have made it a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It tells the agent how to supply `source` for two connection types and warns 'Never pass credentials', which is real operational guidance. However it gives no when-to-use vs. when-not guidance and never points at alternatives (e.g. list_connections to obtain connectionId, or open_document once registered), so usage is implied rather than directed.

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