Skip to main content
Glama

add-external-link-to-story

Enhance Shortcut stories by inserting external links directly. Input the story's public ID and the desired URL to integrate additional resources seamlessly into project workflows.

Instructions

Add an external link to a Shortcut story

Input Schema

NameRequiredDescriptionDefault
externalLinkYesThe external link URL to add
storyPublicIdYesThe 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 add", "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

  • Registration of the MCP tool 'stories-add-external-link', including input schema (storyPublicId, externalLink) and handler reference to addExternalLinkToStory method.
    "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), );
  • The handler function that implements the tool logic: validates inputs, calls client.addExternalLinkToStory, and returns a success message with 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}`, ); }
  • Zod schema for input parameters: storyPublicId (positive number) and externalLink (URL string max 2048 chars). Used in tool registration.
    storyPublicId: z.number().positive().describe("The public ID of the story"), externalLink: z.string().url().max(2048).describe("The external link URL to add"), },

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