Skip to main content
Glama

Create document

nextcloud_create_document

Create a new document at a specified path, with the file extension selecting the document type and an optional template; everyone with file access can edit it together in real time.

Instructions

Create one new document at path; the extension picks the type (.docx, .xlsx, .pptx, .odg, .md).

POST /ocs/v2.php/apps/files/api/v1/templates/create

template_path is a template filename from list_document_templates; omitted, the document starts empty. Everyone with access to the file edits it together in real time.

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": {
      "path": "<path>"
    },
    "name": "nextcloud_create_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
template_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, destructiveHint=false and openWorldHint=true; the description adds genuinely new behavior: the type is inferred from the file extension, creation can be seeded from a template, and the resulting file is a real-time collaborative document editable by everyone with access. It does not say what happens if a file already exists at path, which matters for a non-idempotent create.

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?

Front-loaded with the core action and the extension-to-type rule, then the template note, then the collaboration caveat; every sentence carries information. The raw POST endpoint line is developer-facing detail that adds little for an agent choosing or calling the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter mutation with no output schema, the description covers type inference, template sourcing, and the shared-editing nature of the result. It omits what the call returns (file id, path, or URL) and the overwrite/conflict behavior when path already exists — meaningful gaps given idempotentHint=false and no output schema to answer them.

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 description coverage is 0%, so the description carries the burden; it does define both parameters' meaning (path is the target, template_path is a filename from list_document_templates defaulting to an empty document). However, it leaves path format ambiguous — relative to the files root? directory plus filename? must the extension be included — which is exactly the gap the schema does not fill.

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 one new document at path") plus the distinguishing mechanism: the extension determines the document type from a named list (.docx, .xlsx, .pptx, .odg, .md). That separates it cleanly from nextcloud_create_note, nextcloud_create_folder, and nextcloud_write_file without needing to open any 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?

Gives clear conditional guidance for the optional parameter ("template_path is a template filename from list_document_templates; omitted, the document starts empty"), which routes the agent to the sibling that supplies valid values. It stops short of stating when to prefer this over nextcloud_write_file or nextcloud_open_document, so no explicit exclusions.

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

Deploy Server

Other Tools