Skip to main content
Glama
useshortcut

Shortcut MCP Server

Official
by useshortcut

objectives-search

Search and filter Shortcut objectives by ID, name, description, state, owner, team, or date criteria to find specific project goals.

Instructions

Find Shortcut objectives.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nextPageTokenNoIf a next_page_token was returned from the search result, pass it in to get the next page of results. Should be combined with the original search parameters.
idNoFind objectives matching the specified id
nameNoFind objectives matching the specified name
descriptionNoFind objectives matching the specified description
stateNoFind objectives matching the specified state
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 objectives matching the specified team. Should be a team mention name.
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.
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.
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").

Implementation Reference

  • Registers the 'objectives-search' MCP tool using server.addToolWithReadAccess, including the tool name, description, input schema, and handler reference.
    server.addToolWithReadAccess(
    	"objectives-search",
    	"Find Shortcut objectives.",
    	{
    		nextPageToken: z
    			.string()
    			.optional()
    			.describe(
    				"If a next_page_token was returned from the search result, pass it in to get the next page of results. Should be combined with the original search parameters.",
    			),
    		id: z.number().optional().describe("Find objectives matching the specified id"),
    		name: z.string().optional().describe("Find objectives matching the specified name"),
    		description: z
    			.string()
    			.optional()
    			.describe("Find objectives matching the specified description"),
    		state: z
    			.enum(["unstarted", "started", "done"])
    			.optional()
    			.describe("Find objectives matching the specified state"),
    		owner: user("owner"),
    		requester: user("requester"),
    		team: z
    			.string()
    			.optional()
    			.describe("Find objectives matching the specified team. Should be a team mention name."),
    		isUnstarted: is("unstarted"),
    		isStarted: is("started"),
    		isDone: is("completed"),
    		isArchived: is("archived"),
    		hasOwner: has("an owner"),
    		created: date(),
    		updated: date(),
    		completed: date(),
    	},
    	async ({ nextPageToken, ...params }) => await tools.searchObjectives(params, nextPageToken),
    );
  • Handler function that performs the objectives search: builds query, calls Shortcut client searchMilestones, formats results with pagination.
    async searchObjectives(params: QueryParams, nextToken?: string) {
    	const currentUser = await this.client.getCurrentUser();
    	const query = await buildSearchQuery(params, currentUser);
    	const { milestones, total, next_page_token } = await this.client.searchMilestones(
    		query,
    		nextToken,
    	);
    
    	if (!milestones)
    		throw new Error(`Failed to search for milestones matching your query: "${query}"`);
    	if (!milestones.length) return this.toResult(`Result: No milestones found.`);
    
    	return this.toResult(
    		`Result (${milestones.length} shown of ${total} total milestones found):`,
    		await this.entitiesWithRelatedEntities(milestones, "objectives"),
    		next_page_token,
    	);
    }
  • Input schema using Zod validators for the 'objectives-search' tool parameters, including pagination, filters by id, name, state, users, dates, etc.
    {
    	nextPageToken: z
    		.string()
    		.optional()
    		.describe(
    			"If a next_page_token was returned from the search result, pass it in to get the next page of results. Should be combined with the original search parameters.",
    		),
    	id: z.number().optional().describe("Find objectives matching the specified id"),
    	name: z.string().optional().describe("Find objectives matching the specified name"),
    	description: z
    		.string()
    		.optional()
    		.describe("Find objectives matching the specified description"),
    	state: z
    		.enum(["unstarted", "started", "done"])
    		.optional()
    		.describe("Find objectives matching the specified state"),
    	owner: user("owner"),
    	requester: user("requester"),
    	team: z
    		.string()
    		.optional()
    		.describe("Find objectives matching the specified team. Should be a team mention name."),
    	isUnstarted: is("unstarted"),
    	isStarted: is("started"),
    	isDone: is("completed"),
    	isArchived: is("archived"),
    	hasOwner: has("an owner"),
    	created: date(),
    	updated: date(),
    	completed: date(),
    },
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 of behavioral disclosure. It mentions 'Find' but doesn't clarify if this is a read-only operation, whether it supports pagination (implied by the 'nextPageToken' parameter but not stated), or any rate limits or authentication requirements. The description lacks critical behavioral context beyond the basic action.

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 a single sentence, 'Find Shortcut objectives.', which is front-loaded and wastes no words. It efficiently states the core purpose without unnecessary elaboration.

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 (16 parameters, no annotations, no output schema), the description is incomplete. It doesn't address the tool's behavior, output format, pagination, or error handling. For a search tool with many filtering options, more context is needed to guide effective use.

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%, with detailed parameter descriptions in the input schema. The description adds no additional meaning beyond the schema, such as explaining how parameters interact or default behaviors. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

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

Purpose3/5

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

The description 'Find Shortcut objectives' states the basic action (find) and resource (Shortcut objectives), but it's vague about scope and functionality. It doesn't specify whether this is a simple search or a filtered query, nor does it distinguish from sibling tools like 'objectives-get-by-id' or 'stories-search' which might retrieve similar data.

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. With sibling tools like 'objectives-get-by-id' (for specific IDs) and 'stories-search' (for story-level searches), the description offers no context on whether this is for broad objective searches, filtered queries, or paginated results, leaving usage ambiguous.

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