Skip to main content
Glama
useshortcut

Shortcut MCP Server

Official
by useshortcut

stories-upload-file

Attach files to Shortcut stories by uploading them directly from your local system. Connect documents and assets to project management tasks for better organization and collaboration.

Instructions

Upload a file and link it to a story.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
storyPublicIdYesThe public ID of the story
filePathYesThe path to the file to upload

Implementation Reference

  • The handler function that implements the core logic of uploading a file to a specific Shortcut story. It validates inputs, fetches the story, uploads the file using the client, and returns a success message with file details.
    async uploadFileToStory(storyPublicId: number, filePath: string) {
    	if (!storyPublicId) throw new Error("Story public ID is required");
    	if (!filePath) throw new Error("File path is required");
    
    	const story = await this.client.getStory(storyPublicId);
    	if (!story)
    		throw new Error(`Failed to retrieve Shortcut story with public ID: ${storyPublicId}`);
    
    	const uploadedFile = await this.client.uploadFile(storyPublicId, filePath);
    
    	if (!uploadedFile) throw new Error(`Failed to upload file to story sc-${storyPublicId}`);
    
    	return this.toResult(
    		`Uploaded file "${uploadedFile.name}" to story sc-${storyPublicId}. File ID is: ${uploadedFile.id}`,
    	);
    }
  • The Zod input schema defining parameters for the 'stories-upload-file' tool: storyPublicId (positive number) and filePath (string).
    	storyPublicId: z.number().positive().describe("The public ID of the story"),
    	filePath: z.string().describe("The path to the file to upload"),
    },
  • The registration of the 'stories-upload-file' MCP tool using server.addToolWithWriteAccess, including name, description, input schema, and reference to the handler function.
    server.addToolWithWriteAccess(
    	"stories-upload-file",
    	"Upload a file and link it to a story.",
    	{
    		storyPublicId: z.number().positive().describe("The public ID of the story"),
    		filePath: z.string().describe("The path to the file to upload"),
    	},
    	async ({ storyPublicId, filePath }) => await tools.uploadFileToStory(storyPublicId, filePath),
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool uploads and links a file, implying a write operation, but doesn't cover critical aspects like required permissions, file size limits, supported file types, whether the upload is asynchronous, or what happens on failure. This leaves significant gaps in understanding the tool's behavior.

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?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every part of the sentence earns its place by conveying essential information.

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

Completeness2/5

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

Given the complexity of a file upload operation with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., error handling, side effects), return values, and usage context. For a tool that modifies data by linking files to stories, more comprehensive guidance is needed to ensure safe and correct invocation.

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%, with both parameters ('storyPublicId' and 'filePath') well-documented in the schema. The description adds no additional meaning beyond what the schema provides, such as explaining the format of 'storyPublicId' or constraints on 'filePath'. Given the high schema coverage, a baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 clearly states the action ('upload a file') and the target resource ('link it to a story'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'stories-add-external-link' or 'stories-add-relation', which might also involve linking content to stories, leaving some ambiguity about when to choose this tool over those alternatives.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing an existing story or file, or compare it to similar tools like 'stories-add-external-link' for linking URLs instead of files. This lack of context makes it harder for an agent to decide when this tool is appropriate.

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