stories-add-external-link
Add external URLs to Shortcut stories to link related resources, documentation, or references directly within project management tasks.
Instructions
Add an external link to a Shortcut story
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| storyPublicId | Yes | The public ID of the story | |
| externalLink | Yes | The external link URL to add |
Implementation Reference
- src/tools/stories.ts:769-778 (handler)Handler function that validates inputs, calls the Shortcut client to add the external link to the story, and returns a success message with the story URL.async addExternalLinkToStory(storyPublicId: number, externalLink: string) { if (!storyPublicId) throw new Error("Story public ID is required"); if (!externalLink) throw new Error("External link is required"); const updatedStory = await this.client.addExternalLinkToStory(storyPublicId, externalLink); return this.toResult( `Added external link to story sc-${storyPublicId}. Story URL: ${updatedStory.app_url}`, ); }
- src/tools/stories.ts:331-340 (registration)Registers the tool 'stories-add-external-link' with MCP server, including input schema validation using Zod and references the handler method.server.addToolWithWriteAccess( "stories-add-external-link", "Add an external link to a Shortcut story", { storyPublicId: z.number().positive().describe("The public ID of the story"), externalLink: z.string().url().max(2048).describe("The external link URL to add"), }, async ({ storyPublicId, externalLink }) => await tools.addExternalLinkToStory(storyPublicId, externalLink), );
- src/tools/stories.ts:334-337 (schema)Zod schema defining input parameters: storyPublicId (positive number) and externalLink (valid URL up to 2048 chars).{ storyPublicId: z.number().positive().describe("The public ID of the story"), externalLink: z.string().url().max(2048).describe("The external link URL to add"), },