get_project_list
Retrieve a list of projects from Backlog, filtering by archived status or administrator access. Use this tool to efficiently manage and organize project data through API integration.
Instructions
Returns list of projects
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Only applies to administrators. If ‘true,’ it returns all projects. If ‘false,’ it returns only projects they have joined. | |
| archived | No | For unspecified parameters, this form returns all projects. For ‘false’ parameters, it returns unarchived projects. For ‘true’ parameters, it returns archived projects. |
Implementation Reference
- src/tools/getProjectList.ts:28-47 (handler)Factory function that creates the 'get_project_list' tool definition, including the handler logic that calls backlog.getProjects({ archived, all }) to fetch the list of projects.export const getProjectListTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof getProjectListSchema>, (typeof ProjectSchema)['shape'] > => { return { name: 'get_project_list', description: t( 'TOOL_GET_PROJECT_LIST_DESCRIPTION', 'Returns list of projects' ), schema: z.object(getProjectListSchema(t)), outputSchema: ProjectSchema, importantFields: ['id', 'projectKey', 'name'], handler: async ({ archived, all }) => backlog.getProjects({ archived, all }), }; };
- src/tools/getProjectList.ts:7-26 (schema)Defines the Zod input schema for the get_project_list tool, with optional 'archived' and 'all' boolean parameters.const getProjectListSchema = buildToolSchema((t) => ({ archived: z .boolean() .optional() .describe( t( 'TOOL_GET_PROJECT_LIST_ARCHIVED', 'For unspecified parameters, this form returns all projects. For ‘false’ parameters, it returns unarchived projects. For ‘true’ parameters, it returns archived projects.' ) ), all: z .boolean() .optional() .describe( t( 'TOOL_GET_PROJECT_LIST_ALL', 'Only applies to administrators. If ‘true,’ it returns all projects. If ‘false,’ it returns only projects they have joined.' ) ), }));
- src/tools/tools.ts:76-81 (registration)Registers the getProjectListTool in the 'project' toolset group within the allTools function.getProjectListTool(backlog, helper), addProjectTool(backlog, helper), getProjectTool(backlog, helper), updateProjectTool(backlog, helper), deleteProjectTool(backlog, helper), ],
- src/tools/tools.ts:26-26 (registration)Imports the getProjectListTool for use in toolset registration.import { getProjectListTool } from './getProjectList.js';
- src/tools/getProjectList.ts:42-42 (schema)Specifies the output schema as ProjectSchema for the get_project_list tool.outputSchema: ProjectSchema,