Skip to main content
Glama

unassign-current-user-as-owner

Remove the current user as the owner of a specified story in Shortcut. Use this tool to update ownership by providing the story's public ID, ensuring accurate project management and task allocation.

Instructions

Unassign the current user as the owner of a story

Input Schema

NameRequiredDescriptionDefault
storyPublicIdYesThe public ID of the story

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "storyPublicId": { "description": "The public ID of the story", "exclusiveMinimum": 0, "type": "number" } }, "required": [ "storyPublicId" ], "type": "object" }

Implementation Reference

  • Registration of the tool 'stories-unassign-current-user' that unassigns the current user as owner of a story by calling unassignCurrentUserAsOwner
    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), );
  • Handler function unassignCurrentUserAsOwner that implements the logic to unassign the current user from being an owner of the specified story by removing their ID from owner_ids
    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}`); }
  • Input schema for the unassign tool: requires storyPublicId as positive number
    { storyPublicId: z.number().positive().describe("The public ID of the story"), },

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