Skip to main content
Glama

get-iteration

Retrieve a Shortcut iteration by its public ID using the get-iteration tool. Specify whether to return all fields or a slim version to customize the data output.

Instructions

Get a Shortcut iteration by public ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fullNoTrue to return all iteration fields from the API. False to return a slim version that excludes uncommon fields
iterationPublicIdYesThe public ID of the iteration to get

Implementation Reference

  • Handler function that implements the logic to get a specific iteration by public ID, fetches from client, handles error, and formats response with related entities.
    async getIteration(iterationPublicId: number, full = false) { const iteration = await this.client.getIteration(iterationPublicId); if (!iteration) throw new Error( `Failed to retrieve Shortcut iteration with public ID: ${iterationPublicId}.`, ); return this.toResult( `Iteration: ${iterationPublicId}`, await this.entityWithRelatedEntities(iteration, "iteration", full), ); }
  • MCP tool registration for 'iterations-get-by-id', which is the tool to get an iteration. Includes schema and points to the handler.
    server.addToolWithReadAccess( "iterations-get-by-id", "Get a Shortcut iteration by public ID", { iterationPublicId: z.number().positive().describe("The public ID of the iteration to get"), full: z .boolean() .optional() .default(false) .describe( "True to return all iteration fields from the API. False to return a slim version that excludes uncommon fields", ), }, async ({ iterationPublicId, full }) => await tools.getIteration(iterationPublicId, full), );
  • Zod schema for input parameters of the get iteration tool: iterationPublicId (required number) and full (optional boolean).
    { iterationPublicId: z.number().positive().describe("The public ID of the iteration to get"), full: z .boolean() .optional() .default(false) .describe( "True to return all iteration fields from the API. False to return a slim version that excludes uncommon fields", ), },
  • Client wrapper method that calls the underlying Shortcut client to fetch the iteration.
    async getIteration(iterationPublicId: number) { const response = await this.client.getIteration(iterationPublicId);

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