getBugDetail
Retrieve detailed bug information from ZenTao project management system using bug ID, including steps and extracted image URLs for comprehensive issue tracking.
Instructions
Get bug detail by ID; also extracts image URLs from steps HTML into stepsImages.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bugId | Yes | Bug ID (required) |
Implementation Reference
- src/zentao-mcp-server.js:720-731 (handler)Handler for the 'getBugDetail' tool. Extracts bugId from input arguments, calls the helper getBugWithImages to fetch and enrich bug data, then returns it as formatted JSON text content.if (name === "getBugDetail") { const { bugId } = args; const bug = await getBugWithImages(bugId); return { content: [ { type: "text", text: JSON.stringify({ bug }, null, 2), }, ], }; }
- src/zentao-mcp-server.js:514-526 (registration)Registration of the 'getBugDetail' tool in the tools list, including its name, description, and input schema definition.{ name: "getBugDetail", description: "Get bug detail by ID; also extracts image URLs from steps HTML into stepsImages.", inputSchema: { type: "object", properties: { bugId: { type: "number", description: "Bug ID (required)" }, }, required: ["bugId"], additionalProperties: false, }, },
- src/zentao-mcp-server.js:282-288 (helper)Core helper function for fetching bug details via ZenTao API and enriching with parsed image URLs from steps HTML.async function getBugWithImages(bugId) { const res = await callZenTao({ path: `bugs/${bugId}` }); const bug = res.data || {}; const stepsHtml = bug.steps || bug.stepsHtml || ""; const stepsImages = parseImageSources(stepsHtml); return { ...bug, stepsHtml, stepsImages }; }