list_track_definitions
List all workflow track definitions to see reusable templates that auto-create tasks at set intervals when applied to projects or opportunities.
Instructions
List workflow track definitions: reusable templates that auto-create tasks at configured intervals when applied to an opportunity or project. Each track includes nested taskDefinitions specifying what to create and when. Use this to understand what automations exist.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| perPage | No | Page size, max 100. Defaults to 100 for reference data. |
Implementation Reference
- src/tools/metadata.ts:90-99 (handler)The actual handler function for list_track_definitions. Fetches track definitions from Capsule API /trackdefinitions with pagination support.
export async function listTrackDefinitions(input: z.infer<typeof listTrackDefinitionsSchema>) { // Note response key: `trackDefinitions` (camelCase plural). Each entry // includes nested taskDefinitions describing the auto-tasks the track // creates when applied. const { data, nextPage } = await capsuleGet<{ trackDefinitions: unknown[] }>( "/trackdefinitions", { page: input.page ?? 1, perPage: input.perPage ?? 100 }, ); return { ...data, nextPage }; } - src/tools/metadata.ts:88-88 (schema)Zod schema for list_track_definitions: accepts optional page/perPage pagination fields.
export const listTrackDefinitionsSchema = z.object({ ...paginationFields }); - src/server.ts:911-917 (registration)Registration of 'list_track_definitions' as an MCP tool in the server, using registerTool helper.
registerTool( server, "list_track_definitions", "List workflow track definitions: reusable templates that auto-create tasks at configured intervals when applied to an opportunity or project. Each track includes nested taskDefinitions specifying what to create and when. Use this to understand what automations exist.", listTrackDefinitionsSchema, listTrackDefinitions, ); - src/server.ts:139-140 (registration)Import of listTrackDefinitionsSchema and listTrackDefinitions from ./tools/metadata.js.
listTrackDefinitionsSchema, listTrackDefinitions, - src/tools/metadata.ts:17-26 (helper)Shared paginationFields used in the schema definition.
const paginationFields = { page: z.number().int().positive().optional(), perPage: z .number() .int() .min(1) .max(100) .optional() .describe("Page size, max 100. Defaults to 100 for reference data."), };