Skip to main content
Glama
useshortcut

Shortcut MCP Server

Official
by useshortcut

stories-get-by-external-link

Retrieve 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

  • The main handler function for the 'stories-get-by-external-link' tool. It validates input, calls the client wrapper to fetch stories, and formats the result.
    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"),
    	);
    }
  • Registers the 'stories-get-by-external-link' tool on the MCP server, defining its name, description, input schema, and handler.
    server.addToolWithReadAccess(
    	"stories-get-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),
    );
  • Zod input schema for the tool, validating the externalLink parameter as a URL string up to 2048 characters.
    {
    	externalLink: z.string().url().max(2048).describe("The external link URL to search for"),
    },
  • Helper method in ShortcutClientWrapper that queries the Shortcut API for stories linked to the given external link, lowercasing the link for matching.
    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 };
    }
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 mentions the action ('find all stories') but does not describe key traits like whether this is a read-only operation, potential rate limits, authentication requirements, or the format of returned results. This leaves significant gaps in understanding the tool's behavior beyond its basic function.

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 directly states the tool's function without unnecessary words. It is front-loaded and efficient, making it easy to understand at a glance, with no wasted information.

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 for a tool that performs a search operation. It does not explain what 'stories' entail, how results are returned (e.g., list format, pagination), or any error conditions, leaving the agent with insufficient context for effective 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?

The input schema has 100% description coverage, with the parameter 'externalLink' documented as 'The external link URL to search for'. The description adds no additional meaning beyond this, such as examples or edge cases, but the schema provides adequate baseline information, justifying a score of 3.

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 as 'Find all stories that contain a specific external link', which specifies the verb ('find'), resource ('stories'), and constraint ('contain a specific external link'). However, it does not explicitly differentiate from sibling tools like 'stories-search', which might also handle link-based queries, leaving some ambiguity.

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 such as 'stories-search' or 'stories-get-by-id'. It lacks context on prerequisites, exclusions, or specific scenarios where this tool is preferred, offering only a basic functional statement without comparative insights.

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