Skip to main content
Glama
useshortcut

Shortcut MCP Server

Official
by useshortcut

stories-create-subtask

Create a sub-task within a parent story in Shortcut project management to break down complex work into manageable components.

Instructions

Create a new story as a sub-task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parentStoryPublicIdYesThe public ID of the parent story
nameYesThe name of the sub-task. Required.
descriptionNoThe description of the sub-task

Implementation Reference

  • The main handler function that implements the logic for creating a new subtask story under a given parent story. It fetches the parent story and workflow, determines the default state, and creates the subtask using the client.
    async createSubTask({
    	parentStoryPublicId,
    	name,
    	description,
    }: {
    	parentStoryPublicId: number;
    	name: string;
    	description?: string;
    }) {
    	if (!parentStoryPublicId) throw new Error("ID of parent story is required");
    	if (!name) throw new Error("Sub-task name is required");
    
    	const parentStory = await this.client.getStory(parentStoryPublicId);
    	if (!parentStory)
    		throw new Error(`Failed to retrieve parent story with public ID: ${parentStoryPublicId}`);
    
    	const workflow = await this.client.getWorkflow(parentStory.workflow_id);
    	if (!workflow) throw new Error("Failed to retrieve workflow of parent story");
    
    	const workflowState = workflow.states[0];
    	if (!workflowState) throw new Error("Failed to determine default state for sub-task");
    
    	const subTask = await this.client.createStory({
    		name,
    		description,
    		story_type: parentStory.story_type as CreateStoryParams["story_type"],
    		epic_id: parentStory.epic_id,
    		group_id: parentStory.group_id,
    		workflow_state_id: workflowState.id,
    		parent_story_id: parentStoryPublicId,
    	});
    
    	return this.toResult(`Created sub-task: sc-${subTask.id}`);
    }
  • The registration of the 'stories-create-subtask' tool using server.addToolWithWriteAccess, linking to the handler.
    server.addToolWithWriteAccess(
    	"stories-create-subtask",
    	"Create a new story as a sub-task",
    	{
    		parentStoryPublicId: z.number().positive().describe("The public ID of the parent story"),
    		name: z.string().min(1).max(512).describe("The name of the sub-task. Required."),
    		description: z.string().max(10_000).optional().describe("The description of the sub-task"),
    	},
    	async (params) => await tools.createSubTask(params),
    );
  • The Zod schema defining the input parameters for the tool: parentStoryPublicId, name, and optional description.
    {
    	parentStoryPublicId: z.number().positive().describe("The public ID of the parent story"),
    	name: z.string().min(1).max(512).describe("The name of the sub-task. Required."),
    	description: z.string().max(10_000).optional().describe("The description of the sub-task"),
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool creates something (implying a write/mutation operation) but doesn't mention permissions required, whether this is a destructive operation, rate limits, or what happens on success/failure. For a creation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 extremely concise at just 5 words, front-loading the essential action and resource. Every word earns its place with no wasted text, 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 creation/mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what gets returned, error conditions, or important behavioral aspects like whether the creation is immediate or requires approval. The context demands more information than what's provided.

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 description doesn't add any parameter information beyond what's already in the schema (which has 100% coverage). It doesn't explain the relationship between parent story and sub-task, or provide context about what 'public ID' means. Since schema coverage is high, the baseline score of 3 is appropriate.

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 ('Create a new story') and resource type ('as a sub-task'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'stories-create' or 'stories-add-subtask', which would require explicit comparison to achieve a perfect score.

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. There are multiple sibling tools for story creation and sub-task management (e.g., 'stories-create', 'stories-add-subtask'), but the description doesn't mention any of them or explain when this specific 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