Skip to main content
Glama
ampcome-mcps

Shortcut MCP Server

by ampcome-mcps

set-story-external-links

Replace all external links on a Shortcut story with new URLs to update references and attachments.

Instructions

Replace all external links on a story with a new set of links

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
storyPublicIdYesThe public ID of the story
externalLinksYesArray of external link URLs to set (replaces all existing links)

Implementation Reference

  • Main handler for the tool: validates parameters, delegates to client wrapper, formats MCP response.
    async setStoryExternalLinks(storyPublicId: number, externalLinks: string[]) {
    	if (!storyPublicId) throw new Error("Story public ID is required");
    	if (!Array.isArray(externalLinks)) throw new Error("External links must be an array");
    
    	const updatedStory = await this.client.setStoryExternalLinks(storyPublicId, externalLinks);
    
    	const linkCount = externalLinks.length;
    	const message =
    		linkCount === 0
    			? `Removed all external links from story sc-${storyPublicId}`
    			: `Set ${linkCount} external link${linkCount === 1 ? "" : "s"} on story sc-${storyPublicId}`;
    
    	return this.toResult(`${message}. Story URL: ${updatedStory.app_url}`);
    }
  • Client wrapper method that implements the external links update by calling the base updateStory API.
    async setStoryExternalLinks(storyPublicId: number, externalLinks: string[]): Promise<Story> {
    	return await this.updateStory(storyPublicId, { external_links: externalLinks });
    }
  • Registers the MCP tool with server, defines input schema using Zod, and wires to handler method.
    server.tool(
    	"set-story-external-links",
    	"Replace all external links on a story with a new set of links",
    	{
    		storyPublicId: z.number().positive().describe("The public ID of the story"),
    		externalLinks: z
    			.array(z.string().url().max(2048))
    			.describe("Array of external link URLs to set (replaces all existing links)"),
    	},
    	async ({ storyPublicId, externalLinks }) =>
    		await tools.setStoryExternalLinks(storyPublicId, externalLinks),
    );
  • Input schema for the tool using Zod validation.
    {
    	storyPublicId: z.number().positive().describe("The public ID of the story"),
    	externalLinks: z
    		.array(z.string().url().max(2048))
    		.describe("Array of external link URLs to set (replaces all existing links)"),
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. It states 'replaces all existing links,' which implies a destructive mutation, but doesn't cover critical aspects like permissions needed, whether changes are reversible, rate limits, or what happens if the operation fails. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('Replace all external links') and includes essential context ('with a new set of links'). There is no wasted verbiage, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., side effects, error handling), return values, and usage context relative to siblings. While the schema covers parameters well, the overall context for safe and effective tool invocation is insufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for both parameters (storyPublicId and externalLinks). The description adds minimal value beyond the schema by emphasizing that externalLinks 'replaces all existing links,' but doesn't provide additional context like format examples or constraints. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Replace all external links') and resource ('on a story'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'add-external-link-to-story' or 'remove-external-link-from-story' beyond the 'replace all' phrasing, which is implied but not stated as a distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over 'add-external-link-to-story' for adding links or 'update-story' for broader updates, nor does it specify prerequisites or exclusions, leaving the agent to infer usage from context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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