Skip to main content
Glama

assign-current-user-as-owner

Assign yourself as the owner of a Shortcut story to take responsibility for task management and ensure proper tracking of work items.

Instructions

Assign the current user as the owner of a story

Input Schema

NameRequiredDescriptionDefault
storyPublicIdYesThe 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

  • Handler function that retrieves the story and current user, checks if already owner, and updates the story by adding the current user's ID to owner_ids.
    async assignCurrentUserAsOwner(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 already an owner of story sc-${storyPublicId}`); await this.client.updateStory(storyPublicId, { owner_ids: story.owner_ids.concat([currentUser.id]), }); return this.toResult(`Assigned current user as owner of story sc-${storyPublicId}`); }
  • Tool registration call that defines the tool name, description, input schema (storyPublicId), and handler reference.
    server.tool( "assign-current-user-as-owner", "Assign the current user as the owner of a story", { storyPublicId: z.number().positive().describe("The public ID of the story"), }, async ({ storyPublicId }) => await tools.assignCurrentUserAsOwner(storyPublicId), );
  • Input schema for the tool, validating storyPublicId as a 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/ampcome-mcps/shortcut-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server