Skip to main content
Glama
useshortcut

Shortcut MCP Server

Official
by useshortcut

stories-add-subtask

Link an existing story as a sub-task to a parent story in Shortcut project management, organizing work into hierarchical relationships.

Instructions

Add an existing story as a sub-task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parentStoryPublicIdYesThe public ID of the parent story
subTaskPublicIdYesThe public ID of the sub-task story

Implementation Reference

  • Handler function that implements the logic for adding an existing story as a subtask to a parent story by fetching both stories and updating the subtask's parent_story_id via the client.
    async addStoryAsSubTask({
    	parentStoryPublicId,
    	subTaskPublicId,
    }: {
    	parentStoryPublicId: number;
    	subTaskPublicId: number;
    }) {
    	if (!parentStoryPublicId) throw new Error("ID of parent story is required");
    	if (!subTaskPublicId) throw new Error("ID of sub-task story is required");
    
    	const subTask = await this.client.getStory(subTaskPublicId);
    	if (!subTask) throw new Error(`Failed to retrieve story with public ID: ${subTaskPublicId}`);
    	const parentStory = await this.client.getStory(parentStoryPublicId);
    	if (!parentStory)
    		throw new Error(`Failed to retrieve parent story with public ID: ${parentStoryPublicId}`);
    
    	await this.client.updateStory(subTaskPublicId, {
    		parent_story_id: parentStoryPublicId,
    	});
    
    	return this.toResult(
    		`Added story sc-${subTaskPublicId} as a sub-task of sc-${parentStoryPublicId}`,
    	);
    }
  • Tool registration call that registers 'stories-add-subtask' with input schema using Zod and links to the addStoryAsSubTask handler.
    server.addToolWithWriteAccess(
    	"stories-add-subtask",
    	"Add an existing story as a sub-task",
    	{
    		parentStoryPublicId: z.number().positive().describe("The public ID of the parent story"),
    		subTaskPublicId: z.number().positive().describe("The public ID of the sub-task story"),
    	},
    	async (params) => await tools.addStoryAsSubTask(params),
    );
  • Zod input schema defining parameters for the 'stories-add-subtask' tool: parentStoryPublicId and subTaskPublicId.
    {
    	parentStoryPublicId: z.number().positive().describe("The public ID of the parent story"),
    	subTaskPublicId: z.number().positive().describe("The public ID of the sub-task story"),
    },
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 adds an existing story as a sub-task, implying a mutation operation, but fails to describe critical traits such as required permissions, whether the operation is reversible, error conditions (e.g., if stories are in different projects), or the expected outcome format. This leaves significant gaps for an agent to understand 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, direct sentence with no unnecessary words, making it highly concise and front-loaded. It efficiently conveys the core action without redundancy or fluff, earning full marks for brevity and clarity in structure.

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 tool's complexity as a mutation operation with no annotations and no output schema, the description is incomplete. It lacks details on behavioral aspects (e.g., side effects, error handling), usage context, and what the tool returns, leaving the agent with insufficient information to use it effectively in a broader workflow.

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?

The input schema has 100% description coverage, with clear parameter descriptions in the schema itself. The description does not add any semantic details beyond what the schema provides (e.g., it does not explain the relationship between parent and sub-task stories or validation rules). Given the high schema coverage, a baseline score of 3 is appropriate, as the description does not compensate but also does not 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 ('Add') and resource ('existing story as a sub-task'), making the purpose evident. However, it does not explicitly differentiate from sibling tools like 'stories-create-subtask' (which creates a new sub-task) or 'stories-add-task' (which adds a task rather than a sub-task), leaving some ambiguity in sibling context.

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 lacks context such as prerequisites (e.g., both stories must exist), exclusions (e.g., cannot add a story as its own sub-task), or comparisons to siblings like 'stories-create-subtask' or 'stories-add-relation', leaving the agent to infer usage from the name alone.

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