Skip to main content
Glama
ampcome-mcps

Shortcut MCP Server

by ampcome-mcps

get-upcoming-iterations

Retrieve upcoming Shortcut iterations for the current user's teams to plan and track project timelines effectively.

Instructions

Get the upcoming Shortcut iterations for the current user based on their team memberships

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamIdNoThe ID of a team to filter iterations by

Implementation Reference

  • The handler function that executes the tool logic: fetches upcoming iterations for a specific team or all teams associated with the current user using the Shortcut client, formats the response with entity details.
    async getUpcomingIterations(teamId?: string) {
    	if (teamId) {
    		const team = await this.client.getTeam(teamId);
    		if (!team) throw new Error(`No team found matching id: "${teamId}"`);
    
    		const result = await this.client.getUpcomingIteration([teamId]);
    		const iterations = result.get(teamId);
    		if (!iterations?.length)
    			return this.toResult(`Result: No upcoming iterations found for team.`);
    		if (iterations.length === 1)
    			return this.toResult(
    				"The next upcoming iteration for the team is:",
    				await this.entityWithRelatedEntities(iterations[0], "iteration"),
    			);
    		return this.toResult(
    			"The next upcoming iterations for the team are:",
    			await this.entitiesWithRelatedEntities(iterations, "iterations"),
    		);
    	}
    
    	const currentUser = await this.client.getCurrentUser();
    	if (!currentUser) throw new Error("Failed to retrieve current user.");
    
    	const teams = await this.client.getTeams();
    	const teamIds = teams
    		.filter((team) => team.member_ids.includes(currentUser.id))
    		.map((team) => team.id);
    
    	if (!teamIds.length) throw new Error("Current user does not belong to any teams.");
    
    	const resultsByTeam = await this.client.getUpcomingIteration(teamIds);
    	const allUpcomingIterations = [...resultsByTeam.values()].flat();
    
    	if (!allUpcomingIterations.length)
    		return this.toResult("Result: No upcoming iterations found for any of your teams.");
    	return this.toResult(
    		"The upcoming iterations for all your teams are:",
    		await this.entitiesWithRelatedEntities(allUpcomingIterations, "iterations"),
    	);
    }
  • Registers the get-upcoming-iterations tool with the MCP server, providing description, input schema, and linking to the handler method.
    server.tool(
    	"get-upcoming-iterations",
    	"Get the upcoming Shortcut iterations for the current user based on their team memberships",
    	{
    		teamId: z.string().optional().describe("The ID of a team to filter iterations by"),
    	},
    	async ({ teamId }) => await tools.getUpcomingIterations(teamId),
    );
  • Zod input schema defining the optional 'teamId' parameter for filtering iterations by team.
    {
    	teamId: z.string().optional().describe("The ID of a team to filter iterations by"),
    },
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 the tool retrieves data ('Get') but doesn't disclose behavioral traits such as whether it requires authentication, rate limits, pagination, error handling, or the format of returned iterations. The description is minimal and lacks crucial operational details.

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 without unnecessary words. It directly communicates the tool's function and scope, making it easy to parse and understand 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 no annotations and no output schema, the description is incomplete for a tool that likely returns complex iteration data. It doesn't explain what 'upcoming' means (e.g., time frame), the structure of returned iterations, or any dependencies like user authentication. For a read operation with potential nuances, more context 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?

The input schema has 100% description coverage, with one optional parameter 'teamId' documented as 'The ID of a team to filter iterations by'. The description adds no additional parameter semantics beyond this, so it meets the baseline of 3 where 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') and resource ('upcoming Shortcut iterations'), specifying scope ('for the current user based on their team memberships'). It distinguishes from siblings like 'get-active-iterations' by focusing on 'upcoming' iterations, though it doesn't explicitly contrast with 'search-iterations' or 'get-iteration'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context ('for the current user based on their team memberships') but doesn't explicitly state when to use this tool versus alternatives like 'search-iterations' or 'get-active-iterations'. It provides some guidance by specifying the user scope but lacks clear exclusions or named alternatives.

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