Skip to main content
Glama

Create document

create_document

Create a document METADATA row. The file itself must already exist in the private 'documents' storage bucket — pass its path as object_key (use create_document_upload_url first to obtain an upload URL). Binary content cannot be sent through MCP.

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": {
      "name": "<name>",
      "object_key": "<object_key>"
    },
    "name": "create_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
folder_idNo
mime_typeNodefault application/octet-stream
object_keyYesPath inside the 'documents' storage bucket
size_bytesNo
visibilityNopublic|internal|restricted (default internal)
descriptionNo
target_tenant_idNoPlatform super-admins only: operate on this tenant instead of your own.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, idempotentHint=false, destructiveHint=false. The description adds critical non-obvious behavior: this creates only a metadata row, the binary must pre-exist in a private bucket, and content cannot be uploaded via MCP. It does not mention permission requirements or what happens on duplicate names, but the core behavioral surprise is disclosed.

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 sentences, front-loaded with what is actually created, followed by the precondition and the prerequisite tool. No filler.

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 an 8-parameter mutation tool with no output schema, the description covers the most agent-relevant facts (metadata-only creation, bucket precondition, upload workflow). Missing details on visibility values and target_tenant_id's super-admin scope keep it short of fully complete.

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 50%, and the description adds real meaning for object_key (path inside the private 'documents' bucket, obtained via create_document_upload_url). It says nothing about the other parameters (name, folder_id, visibility, size_bytes, target_tenant_id), leaving several undocumented in both places — adequate but with a clear gap.

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 ('Create a document METADATA row') and immediately narrows scope by clarifying that the binary file is not created — only the metadata row. This distinguishes it from create_document_upload_url, which is named as the prerequisite.

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?

Explicitly sequences the workflow: file must already be in the 'documents' bucket, use create_document_upload_url first to get an upload URL, and binary content cannot be sent through MCP. This is a clear when/how-to-use with the alternative named and the exclusion stated.

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