Skip to main content
Glama

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(), },

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