Skip to main content
Glama
ampcome-mcps

Shortcut MCP Server

by ampcome-mcps

get-stories-by-external-link

Find Shortcut stories containing a specific external URL to track references and dependencies across project management tasks.

Instructions

Find all stories that contain a specific external link

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
externalLinkYesThe external link URL to search for

Implementation Reference

  • Registration of the 'get-stories-by-external-link' tool with MCP server, defining the tool name, description, input schema using Zod, and the handler function.
    server.tool(
    	"get-stories-by-external-link",
    	"Find all stories that contain a specific external link",
    	{
    		externalLink: z.string().url().max(2048).describe("The external link URL to search for"),
    	},
    	async ({ externalLink }) => await tools.getStoriesByExternalLink(externalLink),
    );
  • Core handler function that performs the tool's logic: validates input, calls the Shortcut client to retrieve stories linked to the external URL, and formats the response using toResult and entitiesWithRelatedEntities.
    async getStoriesByExternalLink(externalLink: string) {
    	if (!externalLink) throw new Error("External link is required");
    
    	const { stories, total } = await this.client.getStoriesByExternalLink(externalLink);
    
    	if (!stories || !stories.length) {
    		return this.toResult(`No stories found with external link: ${externalLink}`);
    	}
    
    	return this.toResult(
    		`Found ${total} stories with external link: ${externalLink}`,
    		await this.entitiesWithRelatedEntities(stories, "stories"),
    	);
    }
  • Supporting method in ShortcutClientWrapper that wraps the official Shortcut API call to fetch stories by external link, normalizing the link to lowercase and handling response.
    async getStoriesByExternalLink(externalLink: string) {
    	const response = await this.client.getExternalLinkStories({
    		external_link: externalLink.toLowerCase(),
    	});
    	const stories = response?.data;
    
    	if (!stories) return { stories: null, total: null };
    
    	return { stories, total: stories.length };
    }
  • Input schema validation using Zod for the externalLink parameter: must be a valid URL, max 2048 chars.
    	externalLink: z.string().url().max(2048).describe("The external link URL to search for"),
    },
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 finds stories but doesn't mention any behavioral traits such as permissions required, rate limits, pagination, or what happens if no stories are found. This leaves significant gaps for an agent to understand how to use it effectively.

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, clear sentence that efficiently conveys the core functionality without any fluff. It's front-loaded with the essential action and resource, making it easy for an agent to parse quickly.

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 the lack of annotations and output schema, the description is incomplete. It doesn't cover behavioral aspects like error handling or return format, and with siblings that might overlap, more context is needed to ensure the agent can use this tool correctly in practice.

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?

The input schema has 100% description coverage, with the parameter 'externalLink' well-documented as 'The external link URL to search for.' The description adds no additional semantic context beyond this, such as examples or format nuances, so it meets the baseline for high schema coverage without extra value.

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 tool's purpose: 'Find all stories that contain a specific external link.' It specifies the verb ('find'), resource ('stories'), and constraint ('contain a specific external link'). However, it doesn't explicitly differentiate from sibling tools like 'search-stories' or 'get-story', which might have overlapping functionality, preventing a perfect score.

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. With siblings like 'search-stories' and 'get-story' that might retrieve stories in different ways, there's no indication of when this specific link-based search is preferred or what its limitations are, leaving usage ambiguous.

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