Skip to main content
Glama
useshortcut

Shortcut MCP Server

Official
by useshortcut

documents-create

Create new documents in Shortcut project management with HTML-formatted content and titles for organized team collaboration.

Instructions

Create a new document in Shortcut with a title and content. Returns the document's id, title, and app_url. Note: Use HTML markup for the content (e.g., , , , ) rather than Markdown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesThe title for the new document (max 256 characters)
contentYesThe content for the new document in HTML format (e.g., <p>Hello</p>, <h1>Title</h1>, <ul><li>Item</li></ul>)

Implementation Reference

  • The core handler function that executes the tool logic: creates a new document using the Shortcut client API and returns a formatted result or error.
    private async createDocument(title: string, content: string) {
    	try {
    		const doc = await this.client.createDoc({
    			title,
    			content,
    		});
    
    		return this.toResult("Document created successfully", {
    			id: doc.id,
    			title: doc.title,
    			app_url: doc.app_url,
    		});
    	} catch (error) {
    		const errorMessage = error instanceof Error ? error.message : "Unknown error";
    		return this.toResult(`Failed to create document: ${errorMessage}`);
    	}
    }
  • Zod input schema defining the parameters for the documents-create tool: title (string, max 256 chars) and content (string in HTML).
    {
    	title: z.string().max(256).describe("The title for the new document (max 256 characters)"),
    	content: z
    		.string()
    		.describe(
    			"The content for the new document in HTML format (e.g., <p>Hello</p>, <h1>Title</h1>, <ul><li>Item</li></ul>)",
    		),
    },
  • Registration of the documents-create tool on the CustomMcpServer, specifying name, description, input schema, and handler function.
    server.addToolWithWriteAccess(
    	"documents-create",
    	"Create a new document in Shortcut with a title and content. Returns the document's id, title, and app_url. Note: Use HTML markup for the content (e.g., <p>, <h1>, <ul>, <strong>) rather than Markdown.",
    	{
    		title: z.string().max(256).describe("The title for the new document (max 256 characters)"),
    		content: z
    			.string()
    			.describe(
    				"The content for the new document in HTML format (e.g., <p>Hello</p>, <h1>Title</h1>, <ul><li>Item</li></ul>)",
    			),
    	},
    	async ({ title, content }) => await tools.createDocument(title, content),
    );
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses that the tool creates a new document (mutation behavior), specifies the return values (id, title, app_url), and provides important format guidance about HTML markup requirements. However, it doesn't mention permissions, rate limits, or error conditions.

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 with zero waste: the first states purpose and return values, the second provides crucial format guidance. The description is appropriately sized and front-loaded with essential information.

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 a creation tool with no annotations and no output schema, the description does well by specifying return values and format requirements. However, it lacks information about error cases, permissions needed, or how this tool relates to other creation tools in the sibling list, leaving some contextual gaps.

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 100%, so the schema already documents both parameters thoroughly. The description adds minimal value beyond the schema by reinforcing HTML format in the content parameter example, but doesn't provide additional semantic context or usage examples beyond what's in the schema descriptions.

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?

The description clearly states the action ('Create a new document'), the target resource ('in Shortcut'), and the required inputs ('with a title and content'). It distinguishes itself from sibling tools like documents-list or documents-search by specifying creation rather than retrieval operations.

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?

The description implies usage when creating documents with HTML content, but lacks explicit guidance on when to use this versus alternatives like stories-create or epics-create for other content types. No when-not-to-use or prerequisite information is provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/useshortcut/mcp-server-shortcut'

If you have feedback or need assistance with the MCP directory API, please join our Discord server