unassign-current-user-as-owner
Remove yourself as the owner of a Shortcut story to reassign responsibility or clear your ownership when no longer working on the task.
Instructions
Unassign the current user as the owner of a story
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| storyPublicId | Yes | The public ID of the story |
Input Schema (JSON Schema)
{
"properties": {
"storyPublicId": {
"description": "The public ID of the story",
"exclusiveMinimum": 0,
"type": "number"
}
},
"required": [
"storyPublicId"
],
"type": "object"
}
Implementation Reference
- src/tools/stories.ts:345-363 (handler)The main handler function that implements the tool logic: fetches the story and current user, checks if the current user is an owner, removes the current user from owner_ids via client.updateStory, and returns a success message.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:214-221 (registration)Registers the MCP tool 'unassign-current-user-as-owner' with input schema and handler reference.server.tool( "unassign-current-user-as-owner", "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:217-218 (schema)Zod input schema defining the required 'storyPublicId' parameter.{ storyPublicId: z.number().positive().describe("The public ID of the story"),