stories-unassign-current-user
Remove yourself as the assigned owner from a Shortcut story to clear your workload or reassign tasks.
Instructions
Unassign the current user as the owner of a story
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| storyPublicId | Yes | The public ID of the story |
Implementation Reference
- src/tools/stories.ts:398-416 (handler)The main handler function for the tool. It fetches the story and current user, verifies the current user is an owner, then updates the story by removing the current user from the owner_ids array.async unassignCurrentUserAsOwner(storyPublicId: number) { const story = await this.client.getStory(storyPublicId); if (!story) throw new Error(`Failed to retrieve Shortcut story with public ID: ${storyPublicId}`); const currentUser = await this.client.getCurrentUser(); if (!currentUser) throw new Error("Failed to retrieve current user"); if (!story.owner_ids.includes(currentUser.id)) return this.toResult(`Current user is not an owner of story sc-${storyPublicId}`); await this.client.updateStory(storyPublicId, { owner_ids: story.owner_ids.filter((ownerId) => ownerId !== currentUser.id), }); return this.toResult(`Unassigned current user as owner of story sc-${storyPublicId}`); }
- src/tools/stories.ts:237-244 (registration)Registers the tool 'stories-unassign-current-user' with the MCP server using addToolWithWriteAccess, linking to the handler function.server.addToolWithWriteAccess( "stories-unassign-current-user", "Unassign the current user as the owner of a story", { storyPublicId: z.number().positive().describe("The public ID of the story"), }, async ({ storyPublicId }) => await tools.unassignCurrentUserAsOwner(storyPublicId), );
- src/tools/stories.ts:240-242 (schema)Zod schema defining the input parameter: storyPublicId as a positive number.{ storyPublicId: z.number().positive().describe("The public ID of the story"), },