backlog_get_project
Retrieve project details using the Backlog API by specifying a project ID or key. Facilitates project management within the Backlog MCP Server.
Instructions
Performs an project get using the Backlog Project get API.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectIdOrKey | Yes | Project ID or Project Key |
Implementation Reference
- src/tools/handlers.ts:68-100 (handler)The main handler function 'handleGetProject' for the 'backlog_get_project' tool. It parses input arguments against ProjectParamsSchema, fetches project details via projectService.getProject, formats the response, and handles errors.const handleGetProject: ToolHandler = async (args) => { try { try { const validatedParams = ProjectParamsSchema.parse(args); const text = await projectService.getProject(validatedParams); return { content: [ { type: "text", text: `Project details for ${validatedParams.projectIdOrKey}:\n${text}`, }, ], isError: false, }; } catch (validationError) { throw new ValidationError( `Invalid parameters: ${validationError instanceof Error ? validationError.message : String(validationError)}`, ); } } catch (error) { return { content: [ { type: "text", text: `Error: ${formatError(error)}`, }, ], isError: true, }; } };
- src/tools/handlers.ts:442-455 (registration)Maps the tool name 'backlog_get_project' to its handler 'handleGetProject' in the central toolHandlers registry.export const toolHandlers: Record<ToolName, ToolHandler> = { backlog_get_projects: handleGetProjects, backlog_get_project: handleGetProject, backlog_get_issues: handleGetIssues, backlog_get_issue: handleGetIssue, backlog_add_issue: handleAddIssue, backlog_update_issue: handleUpdateIssue, backlog_delete_issue: handleDeleteIssue, backlog_get_wikis: handleGetWikis, backlog_get_wiki: handleGetWiki, backlog_add_wiki: handleAddWiki, backlog_update_wiki: handleUpdateWiki, backlog_delete_wiki: handleDeleteWiki, };
- src/core/schema.ts:123-125 (schema)Zod schema defining the input parameters for the 'backlog_get_project' tool: requires 'projectIdOrKey'.export const ProjectParamsSchema = z.object({ projectIdOrKey: z.string().describe("Project ID or Project Key"), });
- src/tools/toolDefinitions.ts:533-537 (registration)Defines the MCP Tool object for 'backlog_get_project' with description and input schema (converted from Zod).export const PROJECT_TOOL: Tool = createTool( "backlog_get_project", "Performs an project get using the Backlog Project get API.", ProjectParamsSchema, );