Skip to main content
Glama

stories-remove-subtask

Convert a sub-task into a standalone story by removing its parent relationship in Shortcut project management.

Instructions

Remove a story from its parent. The sub-task will become a regular story.

Input Schema

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

Implementation Reference

  • Handler function that fetches the subtask story and updates it by setting parent_story_id to null, effectively removing it from its parent.
    async removeSubTaskFromParent({ subTaskPublicId }: { subTaskPublicId: number }) { 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}`); await this.client.updateStory(subTaskPublicId, { parent_story_id: null, }); return this.toResult(`Removed story sc-${subTaskPublicId} from its parent story`); }
  • Zod schema defining the input parameter subTaskPublicId for the stories-remove-subtask tool.
    { subTaskPublicId: z.number().positive().describe("The public ID of the sub-task story"), },
  • Registration of the stories-remove-subtask tool using server.addToolWithWriteAccess, linking to the handler and schema.
    server.addToolWithWriteAccess( "stories-remove-subtask", "Remove a story from its parent. The sub-task will become a regular story.", { subTaskPublicId: z.number().positive().describe("The public ID of the sub-task story"), }, async (params) => await tools.removeSubTaskFromParent(params), );

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