Skip to main content
Glama
ampcome-mcps

Shortcut MCP Server

by ampcome-mcps

search-stories

Search and filter Shortcut stories by criteria like status, owner, type, dates, and custom fields to locate specific project tasks.

Instructions

Find Shortcut stories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoFind only stories with the specified public ID
nameNoFind only stories matching the specified name
descriptionNoFind only stories matching the specified description
commentNoFind only stories matching the specified comment
typeNoFind only stories of the specified type
estimateNoFind only stories matching the specified estimate
branchNoFind only stories matching the specified branch
commitNoFind only stories matching the specified commit
prNoFind only stories matching the specified pull request
projectNoFind only stories matching the specified project
epicNoFind only stories matching the specified epic
objectiveNoFind only stories matching the specified objective
stateNoFind only stories matching the specified state
labelNoFind only stories matching the specified label
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 stories matching the specified team. This can be a team mention name or team name.
skillSetNoFind only stories matching the specified skill set
productAreaNoFind only stories matching the specified product area
technicalAreaNoFind only stories matching the specified technical area
priorityNoFind only stories matching the specified priority
severityNoFind only stories matching the specified severity
isDoneNoFind only entities that are completed when true, or only entities that are not completed when false.
isStartedNoFind only entities that are started when true, or only entities that are not started when false.
isUnstartedNoFind only entities that are unstarted when true, or only entities that are not unstarted when false.
isUnestimatedNoFind only entities that are unestimated when true, or only entities that are not unestimated when false.
isOverdueNoFind only entities that are overdue when true, or only entities that are not overdue when false.
isArchivedNoFind only entities that are archived when true, or only entities that are not archived when false.
isBlockerNoFind only entities that are blocking when true, or only entities that are not blocking when false.
isBlockedNoFind only entities that are blocked when true, or only entities that are not blocked when false.
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.
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.
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.
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.
hasPrNoFind only entities that have a pr when true, or only entities that do not have a pr when false. Example: hasOwner: true will find stories with an owner, hasOwner: false will find stories without an owner.
hasCommitNoFind only entities that have a commit when true, or only entities that do not have a commit when false. Example: hasOwner: true will find stories with an owner, hasOwner: false will find stories without an owner.
hasBranchNoFind only entities that have a branch when true, or only entities that do not have a branch when false. Example: hasOwner: true will find stories with an owner, hasOwner: false will find stories without an owner.
hasEpicNoFind only entities that have an epic when true, or only entities that do not have an epic when false. Example: hasOwner: true will find stories with an owner, hasOwner: false will find stories without an owner.
hasTaskNoFind only entities that have a task when true, or only entities that do not have a task when false. Example: hasOwner: true will find stories with an owner, hasOwner: false will find stories without an owner.
hasAttachmentNoFind only entities that have an attachment when true, or only entities that do not have an attachment 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 main handler function for the 'search-stories' tool. It constructs a search query from the input parameters using buildSearchQuery, calls the Shortcut client's searchStories method, and formats the results.
    async searchStories(params: QueryParams) {
    	const currentUser = await this.client.getCurrentUser();
    	const query = await buildSearchQuery(params, currentUser);
    	const { stories, total } = await this.client.searchStories(query);
    
    	if (!stories) throw new Error(`Failed to search for stories matching your query: "${query}".`);
    	if (!stories.length) return this.toResult(`Result: No stories found.`);
    
    	return this.toResult(
    		`Result (first ${stories.length} shown of ${total} total stories found):`,
    		await this.entitiesWithRelatedEntities(stories, "stories"),
    	);
    }
  • Zod schema defining the input parameters for the 'search-stories' tool, including optional filters for story attributes like ID, name, description, type, owner, dates, etc.
    {
    	id: z.number().optional().describe("Find only stories with the specified public ID"),
    	name: z.string().optional().describe("Find only stories matching the specified name"),
    	description: z
    		.string()
    		.optional()
    		.describe("Find only stories matching the specified description"),
    	comment: z.string().optional().describe("Find only stories matching the specified comment"),
    	type: z
    		.enum(["feature", "bug", "chore"])
    		.optional()
    		.describe("Find only stories of the specified type"),
    	estimate: z
    		.number()
    		.optional()
    		.describe("Find only stories matching the specified estimate"),
    	branch: z.string().optional().describe("Find only stories matching the specified branch"),
    	commit: z.string().optional().describe("Find only stories matching the specified commit"),
    	pr: z.number().optional().describe("Find only stories matching the specified pull request"),
    	project: z.number().optional().describe("Find only stories matching the specified project"),
    	epic: z.number().optional().describe("Find only stories matching the specified epic"),
    	objective: z
    		.number()
    		.optional()
    		.describe("Find only stories matching the specified objective"),
    	state: z.string().optional().describe("Find only stories matching the specified state"),
    	label: z.string().optional().describe("Find only stories matching the specified label"),
    	owner: user("owner"),
    	requester: user("requester"),
    	team: z
    		.string()
    		.optional()
    		.describe(
    			"Find only stories matching the specified team. This can be a team mention name or team name.",
    		),
    	skillSet: z
    		.string()
    		.optional()
    		.describe("Find only stories matching the specified skill set"),
    	productArea: z
    		.string()
    		.optional()
    		.describe("Find only stories matching the specified product area"),
    	technicalArea: z
    		.string()
    		.optional()
    		.describe("Find only stories matching the specified technical area"),
    	priority: z
    		.string()
    		.optional()
    		.describe("Find only stories matching the specified priority"),
    	severity: z
    		.string()
    		.optional()
    		.describe("Find only stories matching the specified severity"),
    	isDone: is("completed"),
    	isStarted: is("started"),
    	isUnstarted: is("unstarted"),
    	isUnestimated: is("unestimated"),
    	isOverdue: is("overdue"),
    	isArchived: is("archived").default(false),
    	isBlocker: is("blocking"),
    	isBlocked: is("blocked"),
    	hasComment: has("a comment"),
    	hasLabel: has("a label"),
    	hasDeadline: has("a deadline"),
    	hasOwner: has("an owner"),
    	hasPr: has("a pr"),
    	hasCommit: has("a commit"),
    	hasBranch: has("a branch"),
    	hasEpic: has("an epic"),
    	hasTask: has("a task"),
    	hasAttachment: has("an attachment"),
    	created: date(),
    	updated: date(),
    	completed: date(),
    	due: date(),
    },
  • Registration of the 'search-stories' tool on the MCP server, including name, description, input schema, and handler reference.
    server.tool(
    	"search-stories",
    	"Find Shortcut stories.",
    	{
    		id: z.number().optional().describe("Find only stories with the specified public ID"),
    		name: z.string().optional().describe("Find only stories matching the specified name"),
    		description: z
    			.string()
    			.optional()
    			.describe("Find only stories matching the specified description"),
    		comment: z.string().optional().describe("Find only stories matching the specified comment"),
    		type: z
    			.enum(["feature", "bug", "chore"])
    			.optional()
    			.describe("Find only stories of the specified type"),
    		estimate: z
    			.number()
    			.optional()
    			.describe("Find only stories matching the specified estimate"),
    		branch: z.string().optional().describe("Find only stories matching the specified branch"),
    		commit: z.string().optional().describe("Find only stories matching the specified commit"),
    		pr: z.number().optional().describe("Find only stories matching the specified pull request"),
    		project: z.number().optional().describe("Find only stories matching the specified project"),
    		epic: z.number().optional().describe("Find only stories matching the specified epic"),
    		objective: z
    			.number()
    			.optional()
    			.describe("Find only stories matching the specified objective"),
    		state: z.string().optional().describe("Find only stories matching the specified state"),
    		label: z.string().optional().describe("Find only stories matching the specified label"),
    		owner: user("owner"),
    		requester: user("requester"),
    		team: z
    			.string()
    			.optional()
    			.describe(
    				"Find only stories matching the specified team. This can be a team mention name or team name.",
    			),
    		skillSet: z
    			.string()
    			.optional()
    			.describe("Find only stories matching the specified skill set"),
    		productArea: z
    			.string()
    			.optional()
    			.describe("Find only stories matching the specified product area"),
    		technicalArea: z
    			.string()
    			.optional()
    			.describe("Find only stories matching the specified technical area"),
    		priority: z
    			.string()
    			.optional()
    			.describe("Find only stories matching the specified priority"),
    		severity: z
    			.string()
    			.optional()
    			.describe("Find only stories matching the specified severity"),
    		isDone: is("completed"),
    		isStarted: is("started"),
    		isUnstarted: is("unstarted"),
    		isUnestimated: is("unestimated"),
    		isOverdue: is("overdue"),
    		isArchived: is("archived").default(false),
    		isBlocker: is("blocking"),
    		isBlocked: is("blocked"),
    		hasComment: has("a comment"),
    		hasLabel: has("a label"),
    		hasDeadline: has("a deadline"),
    		hasOwner: has("an owner"),
    		hasPr: has("a pr"),
    		hasCommit: has("a commit"),
    		hasBranch: has("a branch"),
    		hasEpic: has("an epic"),
    		hasTask: has("a task"),
    		hasAttachment: has("an attachment"),
    		created: date(),
    		updated: date(),
    		completed: date(),
    		due: date(),
    	},
    	async (params) => await tools.searchStories(params),
    );
  • Helper function used by the handler to build the search query string from input parameters, handling special cases for users, 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 offers none. It doesn't indicate whether this is a read-only operation, whether it requires authentication, what the output format might be, whether there are rate limits, or how results are returned (e.g., pagination). For a search tool with 44 parameters, this lack of behavioral context is a significant gap that leaves the agent guessing about important operational characteristics.

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 at just three words. While this represents under-specification in terms of content, it's not verbose or poorly structured. Every word earns its place by identifying the action ('Find'), the platform ('Shortcut'), and the resource ('stories'). There's no wasted language or unnecessary complexity.

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 the complexity (44 parameters, no annotations, no output schema), the description is woefully incomplete. It doesn't explain what 'Find' means operationally, what the return format is, whether there are limitations or constraints, or how this tool differs from other story-accessing tools. For a search tool with extensive filtering capabilities, the description should provide more context about the search behavior and results.

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 schema description coverage is 100%, with every parameter having a detailed description in the input schema. The tool description adds no additional parameter information beyond what's already documented in the schema. According to the scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

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 stories' is a tautology that essentially restates the tool name 'search-stories' with the platform name 'Shortcut' added. It doesn't specify what 'find' means operationally (search, filter, retrieve), nor does it distinguish this tool from other story-related tools like 'get-story' or 'get-stories-by-external-link' among the siblings. The purpose is vague beyond the basic concept of finding stories.

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 no guidance on when to use this tool versus alternatives. There are multiple sibling tools for accessing stories (e.g., 'get-story', 'get-stories-by-external-link', 'get-iteration-stories'), but the description doesn't indicate that this is a general search/filter tool versus those more specific retrieval methods. No context about prerequisites, limitations, or appropriate use cases is mentioned.

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