Skip to main content
Glama
ampcome-mcps

Shortcut MCP Server

by ampcome-mcps

add-task-to-story

Add tasks to Shortcut stories to track work items and assign responsibilities within project management workflows.

Instructions

Add a task to a story

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
storyPublicIdYesThe public ID of the story
taskDescriptionYesThe description of the task
taskOwnerIdsNoArray of user IDs to assign as owners of the task

Implementation Reference

  • The main handler function for the 'add-task-to-story' tool. It validates inputs, fetches the story to ensure it exists, optionally resolves task owners, and calls the Shortcut client to add the task to the story.
    async addTaskToStory({
    	storyPublicId,
    	taskDescription,
    	taskOwnerIds,
    }: {
    	storyPublicId: number;
    	taskDescription: string;
    	taskOwnerIds?: string[];
    }) {
    	if (!storyPublicId) throw new Error("Story public ID is required");
    	if (!taskDescription) throw new Error("Task description is required");
    
    	const story = await this.client.getStory(storyPublicId);
    	if (!story)
    		throw new Error(`Failed to retrieve Shortcut story with public ID: ${storyPublicId}`);
    
    	if (taskOwnerIds?.length) {
    		const owners = await this.client.getUserMap(taskOwnerIds as string[]);
    		if (!owners) throw new Error(`Failed to retrieve users with IDs: ${taskOwnerIds.join(", ")}`);
    	}
    
    	const task = await this.client.addTaskToStory(storyPublicId, {
    		description: taskDescription,
    		ownerIds: taskOwnerIds,
    	});
    
    	return this.toResult(`Created task for story sc-${storyPublicId}. Task ID: ${task.id}.`);
    }
  • Registers the 'add-task-to-story' tool with the MCP server, including the input schema using Zod and linking to the handler method.
    server.tool(
    	"add-task-to-story",
    	"Add a task to a story",
    	{
    		storyPublicId: z.number().positive().describe("The public ID of the story"),
    		taskDescription: z.string().min(1).describe("The description of the task"),
    		taskOwnerIds: z
    			.array(z.string())
    			.optional()
    			.describe("Array of user IDs to assign as owners of the task"),
    	},
    	async (params) => await tools.addTaskToStory(params),
    );
  • Zod schema defining the input parameters for the 'add-task-to-story' tool: storyPublicId (required number), taskDescription (required string), taskOwnerIds (optional array of strings).
    	storyPublicId: z.number().positive().describe("The public ID of the story"),
    	taskDescription: z.string().min(1).describe("The description of the task"),
    	taskOwnerIds: z
    		.array(z.string())
    		.optional()
    		.describe("Array of user IDs to assign as owners of the task"),
    },
  • Core call to the ShortcutClientWrapper's addTaskToStory method, which performs the actual API interaction to add the task.
    	const task = await this.client.addTaskToStory(storyPublicId, {
    		description: taskDescription,
    		ownerIds: taskOwnerIds,
    	});
    
    	return this.toResult(`Created task for story sc-${storyPublicId}. Task ID: ${task.id}.`);
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without behavioral details. It doesn't disclose permissions needed, whether the operation is idempotent, error handling, or what happens on success (e.g., task ID returned). For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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, clear sentence with zero waste—it directly states the tool's purpose without fluff. It's appropriately sized and front-loaded, making it easy to parse quickly.

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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects (e.g., side effects, return values), usage context, or how it integrates with sibling tools. Given the complexity of adding tasks and the lack of structured data, more detail is needed.

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 fully documents parameters (storyPublicId, taskDescription, taskOwnerIds). The description adds no meaning beyond the schema—it doesn't explain parameter relationships, constraints, or examples. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Add a task to a story' clearly states the action (add) and resource (task to story), but it's vague about scope and doesn't differentiate from sibling tools like 'create-story' or 'update-task'. It specifies what it does but lacks detail on how it fits within the broader context of story management.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., story must exist), exclusions, or how it relates to siblings like 'create-story' (for initial creation) or 'update-task' (for modifying existing tasks). The description alone offers no usage context.

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/ampcome-mcps/shortcut-mcp'

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