Skip to main content
Glama
ampcome-mcps

Shortcut MCP Server

by ampcome-mcps

update-story

Modify existing Shortcut stories by updating specific fields like name, description, type, or workflow state using the story's public ID.

Instructions

Update an existing Shortcut story. Only provide fields you want to update. The story public ID will always be included in updates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
storyPublicIdYesThe public ID of the story to update
nameNoThe name of the story
descriptionNoThe description of the story
typeNoThe type of the story
epicNoThe epic id of the epic the story belongs to, or null to unset
estimateNoThe point estimate of the story, or null to unset
iterationNoThe iteration id of the iteration the story belongs to, or null to unset
owner_idsNoArray of user UUIDs to assign as owners of the story
workflow_state_idNoThe workflow state ID to move the story to
labelsNoLabels to assign to the story

Implementation Reference

  • The handler function `updateStory` that executes the core logic of updating a Shortcut story based on provided parameters. It validates inputs, fetches the story, prepares update parameters, calls the client to update, and returns a result message.
    async updateStory({
    	storyPublicId,
    	...updates
    }: {
    	storyPublicId: number;
    	name?: string;
    	description?: string;
    	type?: "feature" | "bug" | "chore";
    	epic?: number | null;
    	estimate?: number | null;
    	iteration?: number | null;
    	owner_ids?: string[];
    	workflow_state_id?: number;
    	labels?: Array<{
    		name: string;
    		color?: string;
    		description?: string;
    	}>;
    }) {
    	if (!storyPublicId) throw new Error("Story public ID is required");
    
    	// Verify the story exists
    	const story = await this.client.getStory(storyPublicId);
    	if (!story)
    		throw new Error(`Failed to retrieve Shortcut story with public ID: ${storyPublicId}`);
    
    	// Convert API parameters
    	const updateParams: Record<string, unknown> = {};
    
    	if (updates.name !== undefined) updateParams.name = updates.name;
    	if (updates.description !== undefined) updateParams.description = updates.description;
    	if (updates.type !== undefined) updateParams.story_type = updates.type;
    	if (updates.epic !== undefined) updateParams.epic_id = updates.epic;
    	if (updates.estimate !== undefined) updateParams.estimate = updates.estimate;
    	if (updates.iteration !== undefined) updateParams.iteration_id = updates.iteration;
    	if (updates.owner_ids !== undefined) updateParams.owner_ids = updates.owner_ids;
    	if (updates.workflow_state_id !== undefined)
    		updateParams.workflow_state_id = updates.workflow_state_id;
    	if (updates.labels !== undefined) updateParams.labels = updates.labels;
    
    	// Update the story
    	const updatedStory = await this.client.updateStory(storyPublicId, updateParams);
    
    	return this.toResult(`Updated story sc-${storyPublicId}. Story URL: ${updatedStory.app_url}`);
    }
  • Input schema using Zod for validating parameters of the 'update-story' tool, including storyPublicId (required), and optional fields like name, description, type, epic, estimate, etc.
    	storyPublicId: z.number().positive().describe("The public ID of the story to update"),
    	name: z.string().max(512).optional().describe("The name of the story"),
    	description: z.string().max(10_000).optional().describe("The description of the story"),
    	type: z.enum(["feature", "bug", "chore"]).optional().describe("The type of the story"),
    	epic: z
    		.number()
    		.nullable()
    		.optional()
    		.describe("The epic id of the epic the story belongs to, or null to unset"),
    	estimate: z
    		.number()
    		.nullable()
    		.optional()
    		.describe("The point estimate of the story, or null to unset"),
    	iteration: z
    		.number()
    		.nullable()
    		.optional()
    		.describe("The iteration id of the iteration the story belongs to, or null to unset"),
    	owner_ids: z
    		.array(z.string())
    		.optional()
    		.describe("Array of user UUIDs to assign as owners of the story"),
    	workflow_state_id: z
    		.number()
    		.optional()
    		.describe("The workflow state ID to move the story to"),
    	labels: z
    		.array(
    			z.object({
    				name: z.string().describe("The name of the label"),
    				color: z.string().optional().describe("The color of the label"),
    				description: z.string().optional().describe("The description of the label"),
    			}),
    		)
    		.optional()
    		.describe("Labels to assign to the story"),
    },
  • Registration of the 'update-story' MCP tool using server.tool(), including name, description, input schema, and handler reference to tools.updateStory.
    server.tool(
    	"update-story",
    	"Update an existing Shortcut story. Only provide fields you want to update. The story public ID will always be included in updates.",
    	{
    		storyPublicId: z.number().positive().describe("The public ID of the story to update"),
    		name: z.string().max(512).optional().describe("The name of the story"),
    		description: z.string().max(10_000).optional().describe("The description of the story"),
    		type: z.enum(["feature", "bug", "chore"]).optional().describe("The type of the story"),
    		epic: z
    			.number()
    			.nullable()
    			.optional()
    			.describe("The epic id of the epic the story belongs to, or null to unset"),
    		estimate: z
    			.number()
    			.nullable()
    			.optional()
    			.describe("The point estimate of the story, or null to unset"),
    		iteration: z
    			.number()
    			.nullable()
    			.optional()
    			.describe("The iteration id of the iteration the story belongs to, or null to unset"),
    		owner_ids: z
    			.array(z.string())
    			.optional()
    			.describe("Array of user UUIDs to assign as owners of the story"),
    		workflow_state_id: z
    			.number()
    			.optional()
    			.describe("The workflow state ID to move the story to"),
    		labels: z
    			.array(
    				z.object({
    					name: z.string().describe("The name of the label"),
    					color: z.string().optional().describe("The color of the label"),
    					description: z.string().optional().describe("The description of the label"),
    				}),
    			)
    			.optional()
    			.describe("Labels to assign to the story"),
    	},
    	async (params) => await tools.updateStory(params),
    );
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 hints at a partial update behavior ('Only provide fields you want to update') and notes that the story public ID is always included, but it doesn't cover critical aspects like required permissions, whether updates are reversible, rate limits, or what the response looks like. For a mutation tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded with key information in two sentences, with no wasted words. It efficiently communicates the core action and a constraint, though it could be slightly more structured by explicitly separating usage notes from behavioral details.

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 (10 parameters, mutation operation) and lack of annotations and output schema, the description is incomplete. It should cover more behavioral aspects like error handling, response format, or prerequisites. For a tool with this level of complexity and no structured support, the description falls short of providing adequate context.

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 all parameters thoroughly. The description adds minimal value beyond the schema by implying partial updates and the mandatory inclusion of 'storyPublicId', but it doesn't provide additional syntax, format details, or usage examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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 verb ('Update') and resource ('existing Shortcut story'), making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'create-story' or 'update-task', which would require mentioning it's for modifying existing stories specifically rather than creating new ones or updating other entities.

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 minimal guidance: it mentions that only fields to update should be provided and that the story public ID is always included. However, it lacks explicit when-to-use instructions, such as when to choose this over 'create-story' for new stories or how it relates to other update tools like 'update-task'. No alternatives or exclusions are stated.

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