Skip to main content
Glama
ampcome-mcps

Shortcut MCP Server

by ampcome-mcps

search-epics

Search and filter Shortcut epics by ID, name, state, owner, due dates, and other criteria to manage project workflows.

Instructions

Find Shortcut epics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoFind only epics with the specified public ID
nameNoFind only epics matching the specified name
descriptionNoFind only epics matching the specified description
stateNoFind only epics matching the specified state
objectiveNoFind only epics matching the specified objective
ownerNoFind entities where the owner match the specified user. This must either be the user's mention name or the keyword "me" for the current user.
requesterNoFind entities where the requester match the specified user. This must either be the user's mention name or the keyword "me" for the current user.
teamNoFind only epics matching the specified team. Should be a team's mention name.
commentNoFind only epics matching the specified comment
isUnstartedNoFind only entities that are unstarted when true, or only entities that are not unstarted when false.
isStartedNoFind only entities that are started when true, or only entities that are not started when false.
isDoneNoFind only entities that are completed when true, or only entities that are not completed when false.
isArchivedNoFind only entities that are archived when true, or only entities that are not archived when false.
isOverdueNoFind only entities that are overdue when true, or only entities that are not overdue when false.
hasOwnerNoFind only entities that have an owner when true, or only entities that do not have an owner when false. Example: hasOwner: true will find stories with an owner, hasOwner: false will find stories without an owner.
hasCommentNoFind only entities that have a comment when true, or only entities that do not have a comment when false. Example: hasOwner: true will find stories with an owner, hasOwner: false will find stories without an owner.
hasDeadlineNoFind only entities that have a deadline when true, or only entities that do not have a deadline when false. Example: hasOwner: true will find stories with an owner, hasOwner: false will find stories without an owner.
hasLabelNoFind only entities that have a label when true, or only entities that do not have a label when false. Example: hasOwner: true will find stories with an owner, hasOwner: false will find stories without an owner.
createdNoThe date in "YYYY-MM-DD" format, or one of the keywords: "yesterday", "today", "tomorrow", or a date range in the format "YYYY-MM-DD..YYYY-MM-DD". The date range can also be open ended by using "*" for one of the bounds. Examples: "2023-01-01", "today", "2023-01-01..*" (from Jan 1, 2023 to any future date), "*.2023-01-31" (any date up to Jan 31, 2023), "today..*" (from today onwards), "*.yesterday" (any date up to yesterday). The keywords cannot be used to calculate relative dates (e.g. the following are not valid: "today-1" or "tomorrow+1").
updatedNoThe date in "YYYY-MM-DD" format, or one of the keywords: "yesterday", "today", "tomorrow", or a date range in the format "YYYY-MM-DD..YYYY-MM-DD". The date range can also be open ended by using "*" for one of the bounds. Examples: "2023-01-01", "today", "2023-01-01..*" (from Jan 1, 2023 to any future date), "*.2023-01-31" (any date up to Jan 31, 2023), "today..*" (from today onwards), "*.yesterday" (any date up to yesterday). The keywords cannot be used to calculate relative dates (e.g. the following are not valid: "today-1" or "tomorrow+1").
completedNoThe date in "YYYY-MM-DD" format, or one of the keywords: "yesterday", "today", "tomorrow", or a date range in the format "YYYY-MM-DD..YYYY-MM-DD". The date range can also be open ended by using "*" for one of the bounds. Examples: "2023-01-01", "today", "2023-01-01..*" (from Jan 1, 2023 to any future date), "*.2023-01-31" (any date up to Jan 31, 2023), "today..*" (from today onwards), "*.yesterday" (any date up to yesterday). The keywords cannot be used to calculate relative dates (e.g. the following are not valid: "today-1" or "tomorrow+1").
dueNoThe date in "YYYY-MM-DD" format, or one of the keywords: "yesterday", "today", "tomorrow", or a date range in the format "YYYY-MM-DD..YYYY-MM-DD". The date range can also be open ended by using "*" for one of the bounds. Examples: "2023-01-01", "today", "2023-01-01..*" (from Jan 1, 2023 to any future date), "*.2023-01-31" (any date up to Jan 31, 2023), "today..*" (from today onwards), "*.yesterday" (any date up to yesterday). The keywords cannot be used to calculate relative dates (e.g. the following are not valid: "today-1" or "tomorrow+1").

Implementation Reference

  • The handler function that implements the core logic of the 'search-epics' tool. It constructs a search query, fetches epics from the Shortcut client, handles edge cases, and formats the results.
    async searchEpics(params: QueryParams) {
    	const currentUser = await this.client.getCurrentUser();
    	const query = await buildSearchQuery(params, currentUser);
    	const { epics, total } = await this.client.searchEpics(query);
    
    	if (!epics) throw new Error(`Failed to search for epics matching your query: "${query}"`);
    	if (!epics.length) return this.toResult(`Result: No epics found.`);
    
    	return this.toResult(
    		`Result (first ${epics.length} shown of ${total} total epics found):`,
    		await this.entitiesWithRelatedEntities(epics, "epics"),
    	);
    }
  • Zod schema defining all input parameters and validations for the 'search-epics' tool, including optional filters for ID, name, description, state, owner, etc.
    {
    	id: z.number().optional().describe("Find only epics with the specified public ID"),
    	name: z.string().optional().describe("Find only epics matching the specified name"),
    	description: z
    		.string()
    		.optional()
    		.describe("Find only epics matching the specified description"),
    	state: z
    		.enum(["unstarted", "started", "done"])
    		.optional()
    		.describe("Find only epics matching the specified state"),
    	objective: z
    		.number()
    		.optional()
    		.describe("Find only epics matching the specified objective"),
    	owner: user("owner"),
    	requester: user("requester"),
    	team: z
    		.string()
    		.optional()
    		.describe(
    			"Find only epics matching the specified team. Should be a team's mention name.",
    		),
    	comment: z.string().optional().describe("Find only epics matching the specified comment"),
    	isUnstarted: is("unstarted"),
    	isStarted: is("started"),
    	isDone: is("completed"),
    	isArchived: is("archived").default(false),
    	isOverdue: is("overdue"),
    	hasOwner: has("an owner"),
    	hasComment: has("a comment"),
    	hasDeadline: has("a deadline"),
    	hasLabel: has("a label"),
    	created: date(),
    	updated: date(),
    	completed: date(),
    	due: date(),
    },
  • Registers the 'search-epics' tool with the MCP server, specifying name, description, input schema, and handler function.
    server.tool(
    	"search-epics",
    	"Find Shortcut epics.",
    	{
    		id: z.number().optional().describe("Find only epics with the specified public ID"),
    		name: z.string().optional().describe("Find only epics matching the specified name"),
    		description: z
    			.string()
    			.optional()
    			.describe("Find only epics matching the specified description"),
    		state: z
    			.enum(["unstarted", "started", "done"])
    			.optional()
    			.describe("Find only epics matching the specified state"),
    		objective: z
    			.number()
    			.optional()
    			.describe("Find only epics matching the specified objective"),
    		owner: user("owner"),
    		requester: user("requester"),
    		team: z
    			.string()
    			.optional()
    			.describe(
    				"Find only epics matching the specified team. Should be a team's mention name.",
    			),
    		comment: z.string().optional().describe("Find only epics matching the specified comment"),
    		isUnstarted: is("unstarted"),
    		isStarted: is("started"),
    		isDone: is("completed"),
    		isArchived: is("archived").default(false),
    		isOverdue: is("overdue"),
    		hasOwner: has("an owner"),
    		hasComment: has("a comment"),
    		hasDeadline: has("a deadline"),
    		hasLabel: has("a label"),
    		created: date(),
    		updated: date(),
    		completed: date(),
    		due: date(),
    	},
    	async (params) => await tools.searchEpics(params),
    );
  • Helper utility to build the Shortcut search query string from the tool input parameters, handling special cases for owners/requesters, booleans, numbers, and quoted strings.
    export const buildSearchQuery = async (params: QueryParams, currentUser: MemberInfo | null) => {
    	const query = Object.entries(params)
    		.map(([key, value]) => {
    			const q = getKey(key);
    			if (key === "owner" || key === "requester") {
    				if (value === "me") return `${q}:${currentUser?.mention_name || value}`;
    				return `${q}:${String(value || "").replace(/^@/, "")}`;
    			}
    
    			if (typeof value === "boolean") return value ? q : `!${q}`;
    			if (typeof value === "number") return `${q}:${value}`;
    			if (typeof value === "string" && value.includes(" ")) return `${q}:"${value}"`;
    			return `${q}:${value}`;
    		})
    		.join(" ");
    
    	return query;
    };
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but fails completely. It doesn't indicate whether this is a read-only operation, what permissions are required, how results are returned (e.g., pagination, format), or any rate limits. The single sentence offers no behavioral context beyond the basic action implied by 'Find'.

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 extremely concise with just three words, front-loading the core action. There's zero wasted language or redundancy, making it efficient to parse, though this brevity comes at the cost of completeness.

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?

For a complex search tool with 22 parameters, no annotations, and no output schema, the description is severely inadequate. It doesn't explain the search behavior (e.g., filtering logic, result format), usage context, or relationship to other tools, leaving significant gaps despite the comprehensive parameter schema.

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%, meaning all 22 parameters are well-documented in the input schema with detailed descriptions. The tool description adds no parameter information beyond what's already in the schema, so it meets the baseline score of 3 for high schema coverage without compensating value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Find Shortcut epics' is a tautology that essentially restates the tool name 'search-epics' without adding meaningful specificity. It lacks a clear verb+resource distinction and doesn't differentiate from sibling tools like 'get-epic' or 'search-stories', providing minimal guidance on what this tool uniquely does.

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

Usage Guidelines1/5

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

The description provides absolutely no guidance on when to use this tool versus alternatives. It doesn't mention any context, prerequisites, or exclusions, nor does it reference sibling tools like 'get-epic' (for single epics) or 'search-stories' (for different entity types), leaving the agent with no usage direction.

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