get_issue_types
Retrieve a list of issue types for a specific project using the project ID or key to organize and manage tasks effectively within Backlog.
Instructions
Returns list of issue types for a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectIdOrKey | Yes | Project ID or project key |
Implementation Reference
- src/tools/getIssueTypes.ts:45-55 (handler)The main handler function for the 'get_issue_types' tool. Resolves the project using ID or key, then fetches issue types via the Backlog client.handler: async ({ projectId, projectKey }) => { const result = resolveIdOrKey( 'project', { id: projectId, key: projectKey }, t ); if (!result.ok) { throw result.error; } return backlog.getIssueTypes(result.value); },
- src/tools/getIssueTypes.ts:8-27 (schema)Input schema using Zod: optional projectId (number) or projectKey (string) with descriptions.const getIssueTypesSchema = buildToolSchema((t) => ({ projectId: z .number() .optional() .describe( t( 'TOOL_GET_GIT_REPOSITORIES_PROJECT_ID', 'The numeric ID of the project (e.g., 12345)' ) ), projectKey: z .string() .optional() .describe( t( 'TOOL_GET_GIT_REPOSITORIES_PROJECT_KEY', "The key of the project (e.g., 'PROJECT')" ) ), }));
- src/tools/getIssueTypes.ts:29-57 (registration)Factory function exporting the complete ToolDefinition for 'get_issue_types', including name, description, input/output schemas, important fields, and handler.export const getIssueTypesTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof getIssueTypesSchema>, (typeof IssueTypeSchema)['shape'] > => { return { name: 'get_issue_types', description: t( 'TOOL_GET_ISSUE_TYPES_DESCRIPTION', 'Returns list of issue types for a project' ), schema: z.object(getIssueTypesSchema(t)), outputSchema: IssueTypeSchema, importantFields: ['id', 'name'], handler: async ({ projectId, projectKey }) => { const result = resolveIdOrKey( 'project', { id: projectId, key: projectKey }, t ); if (!result.ok) { throw result.error; } return backlog.getIssueTypes(result.value); }, }; };
- src/tools/tools.ts:99-99 (registration)Instantiates the getIssueTypesTool within the 'issue' toolset group in the central allTools export.getIssueTypesTool(backlog, helper),