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
| Name | Required | Description | Default |
|---|---|---|---|
| externalLink | Yes | The external link URL to remove | |
| storyPublicId | Yes | The public ID of the story |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"externalLink": {
"description": "The external link URL to remove",
"format": "uri",
"maxLength": 2048,
"type": "string"
},
"storyPublicId": {
"description": "The public ID of the story",
"exclusiveMinimum": 0,
"type": "number"
}
},
"required": [
"storyPublicId",
"externalLink"
],
"type": "object"
}
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 }) =>