Skip to main content
Glama

get-stories-by-external-link

Search and retrieve all stories in Shortcut that include a specific external link, enabling efficient tracking of linked references in your project management workflow.

Instructions

Find all stories that contain a specific external link

Input Schema

NameRequiredDescriptionDefault
externalLinkYesThe external link URL to search for

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "externalLink": { "description": "The external link URL to search for", "format": "uri", "maxLength": 2048, "type": "string" } }, "required": [ "externalLink" ], "type": "object" }

Implementation Reference

  • Registration of the tool 'stories-get-by-external-link' (note: code uses 'stories-' prefix) with input schema and reference to handler method.
    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: externalLink as a URL string up to 2048 chars.
    { externalLink: z.string().url().max(2048).describe("The external link URL to search for"), },
  • Tool handler: getStoriesByExternalLink calls client method and formats output with 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"), ); }
  • Core API wrapper handler in ShortcutClientWrapper: calls base ShortcutClient.getExternalLinkStories with lowercased link.
    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 }; }

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