remove-external-link-from-story
Remove an unwanted external link from a Shortcut story using its public ID and the specific URL. This tool ensures clean and accurate story content management.
Instructions
Remove an external link from a Shortcut story
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| externalLink | Yes | The external link URL to remove | |
| storyPublicId | Yes | The public ID of the story |
Implementation Reference
- src/tools/stories.ts:677-686 (handler)Handler function that performs input validation and invokes the ShortcutClientWrapper to remove the specified external link from the story.async removeExternalLinkFromStory(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.removeExternalLinkFromStory(storyPublicId, externalLink); return this.toResult( `Removed external link from story sc-${storyPublicId}. Story URL: ${updatedStory.app_url}`, ); }
- src/tools/stories.ts:313-321 (registration)Registers the MCP tool 'stories-remove-external-link' (corresponding to 'remove-external-link-from-story' handler) with schema and handler reference."stories-remove-external-link", "Remove an external link from 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 remove"), }, async ({ storyPublicId, externalLink }) => await tools.removeExternalLinkFromStory(storyPublicId, externalLink), );
- src/tools/stories.ts:316-319 (schema)Zod schema defining input parameters for the tool: storyPublicId (number) and externalLink (string URL).storyPublicId: z.number().positive().describe("The public ID of the story"), externalLink: z.string().url().max(2048).describe("The external link URL to remove"), }, async ({ storyPublicId, externalLink }) =>