Skip to main content
Glama
useshortcut

Shortcut MCP Server

Official
by useshortcut

iterations-get-stories

Retrieve stories from a specific Shortcut iteration using its public ID. Optionally include story descriptions for detailed task information.

Instructions

Get stories in a specific iteration by iteration public ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iterationPublicIdYesThe public ID of the iteration
includeStoryDescriptionsNoIndicate whether story descriptions should be included. Including descriptions may take longer and will increase the size of the response.

Implementation Reference

  • The handler function that implements the core logic of the 'iterations-get-stories' tool by fetching stories from the Shortcut client for the given iteration and formatting the result.
    async getIterationStories(iterationPublicId: number, includeDescription: boolean) {
    	const { stories } = await this.client.listIterationStories(
    		iterationPublicId,
    		includeDescription,
    	);
    
    	if (!stories)
    		throw new Error(
    			`Failed to retrieve Shortcut stories in iteration with public ID: ${iterationPublicId}.`,
    		);
    
    	return this.toResult(
    		`Result (${stories.length} stories found):`,
    		await this.entitiesWithRelatedEntities(stories, "stories"),
    	);
    }
  • Registers the 'iterations-get-stories' tool on the MCP server, including the input schema definition and reference to the handler function.
    server.addToolWithReadAccess(
    	"iterations-get-stories",
    	"Get stories in a specific iteration by iteration public ID",
    	{
    		iterationPublicId: z.number().positive().describe("The public ID of the iteration"),
    		includeStoryDescriptions: z
    			.boolean()
    			.optional()
    			.default(false)
    			.describe(
    				"Indicate whether story descriptions should be included. Including descriptions may take longer and will increase the size of the response.",
    			),
    	},
    	async ({ iterationPublicId, includeStoryDescriptions }) =>
    		await tools.getIterationStories(iterationPublicId, includeStoryDescriptions),
    );
  • Zod schema defining the input parameters for the 'iterations-get-stories' tool: iterationPublicId (required positive number) and includeStoryDescriptions (optional boolean, default false).
    {
    	iterationPublicId: z.number().positive().describe("The public ID of the iteration"),
    	includeStoryDescriptions: z
    		.boolean()
    		.optional()
    		.default(false)
    		.describe(
    			"Indicate whether story descriptions should be included. Including descriptions may take longer and will increase the size of the response.",
    		),
    },
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. It mentions that it 'gets stories' but doesn't disclose behavioral traits like whether this is a read-only operation, if it requires authentication, potential rate limits, or what the response format looks like (e.g., pagination, error handling). The description is minimal and lacks crucial context for safe invocation.

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 purpose ('Get stories in a specific iteration') with no wasted words. It's appropriately sized for a simple retrieval tool with well-documented parameters.

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 no annotations and no output schema, the description is incomplete for a tool with 2 parameters. It doesn't explain the return values (e.g., story list format), error conditions, or authentication requirements. For a retrieval tool in a context with many siblings, more guidance on usage and behavior is needed.

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%, so the schema fully documents both parameters ('iterationPublicId' and 'includeStoryDescriptions'). The description adds no additional meaning beyond what's in the schema (e.g., it doesn't explain what an 'iteration public ID' is or provide examples). Baseline 3 is appropriate when 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 ('Get stories') and the resource ('in a specific iteration'), with the specific identifier ('by iteration public ID'). It distinguishes from general story tools like 'stories-search' by focusing on iteration-specific retrieval, though it doesn't explicitly differentiate from sibling iteration tools like 'iterations-get-active' or 'iterations-get-upcoming'.

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?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't clarify if this should be used instead of 'stories-search' for iteration-based queries or how it relates to other iteration tools like 'iterations-get-by-id'. The description only states what it does, not when it's appropriate.

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