Skip to main content
Glama
ampcome-mcps

Shortcut MCP Server

by ampcome-mcps

add-external-link-to-story

Attach external URLs to Shortcut stories to connect project tasks with relevant web resources, documentation, or references.

Instructions

Add an external link to a Shortcut story

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
storyPublicIdYesThe public ID of the story
externalLinkYesThe external link URL to add

Implementation Reference

  • The handler function that executes the tool: validates inputs, calls the Shortcut client to add the external link, and returns a formatted result message.
    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}`,
    	);
    }
  • Registers the MCP tool 'add-external-link-to-story' with the server, providing name, description, input schema, and handler reference.
    server.tool(
    	"add-external-link-to-story",
    	"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),
    );
  • Zod schema defining the input parameters: storyPublicId (positive number) and externalLink (URL string).
    	storyPublicId: z.number().positive().describe("The public ID of the story"),
    	externalLink: z.string().url().max(2048).describe("The external link URL to add"),
    },
  • Inline handler in registration that delegates to the class method addExternalLinkToStory.
    	async ({ storyPublicId, externalLink }) =>
    		await tools.addExternalLinkToStory(storyPublicId, externalLink),
    );

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