Skip to main content
Glama
useshortcut

Shortcut MCP Server

Official
by useshortcut

stories-remove-external-link

Remove external links from Shortcut stories to maintain clean project documentation and prevent broken references in your workflow.

Instructions

Remove an external link from a Shortcut story

Input Schema

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

Implementation Reference

  • Core handler implementation in ShortcutClientWrapper that fetches the story, removes the matching external link (case-insensitive) from the external_links array, and updates the story via the Shortcut API.
    async removeExternalLinkFromStory(storyPublicId: number, externalLink: string): Promise<Story> {
    	const story = await this.getStory(storyPublicId);
    	if (!story) throw new Error(`Story ${storyPublicId} not found`);
    
    	const currentLinks = story.external_links || [];
    	const updatedLinks = currentLinks.filter(
    		(link) => link.toLowerCase() !== externalLink.toLowerCase(),
    	);
    
    	return await this.updateStory(storyPublicId, { external_links: updatedLinks });
    }
  • Tool-specific handler in StoryTools class that validates inputs and delegates to the ShortcutClientWrapper, then formats the result message.
    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}`,
    	);
    }
  • Registration of the 'stories-remove-external-link' tool on the MCP server using addToolWithWriteAccess, linking to the handler method.
    server.addToolWithWriteAccess(
    	"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),
    );
  • Zod input schema for the tool parameters: storyPublicId (positive number) and externalLink (URL string max 2048 chars).
    {
    	storyPublicId: z.number().positive().describe("The public ID of the story"),
    	externalLink: z.string().url().max(2048).describe("The external link URL to remove"),
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool performs a removal action but doesn't specify whether this is destructive (e.g., irreversible), requires specific permissions, has rate limits, or what happens on success/failure. 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 directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every part of the sentence earns its place by conveying essential information.

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

Completeness3/5

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

Given the tool's moderate complexity (a mutation with 2 parameters) and no annotations or output schema, the description is minimally adequate. It clarifies the purpose but lacks behavioral details (e.g., side effects, error handling) and usage context. Without structured fields to compensate, the description should do more to be complete for safe agent use.

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 both parameters ('storyPublicId' and 'externalLink') clearly documented in the schema. The description doesn't add any additional meaning beyond what the schema provides (e.g., format details or constraints), so it meets the baseline score of 3 where the schema does the heavy lifting.

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

Purpose5/5

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

The description clearly states the action ('Remove') and the target resource ('an external link from a Shortcut story'), making the purpose specific and unambiguous. It distinguishes this tool from siblings like 'stories-add-external-link' and 'stories-set-external-links' by focusing on removal rather than addition or bulk updates.

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 prerequisites (e.g., the link must exist), exclusions (e.g., cannot remove internal links), or compare it to similar tools like 'stories-set-external-links' for bulk operations. Usage is implied but not explicitly stated.

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/useshortcut/mcp-server-shortcut'

If you have feedback or need assistance with the MCP directory API, please join our Discord server