Skip to main content
Glama

getMyBugs

Retrieve bugs assigned to you in a ZenTao product. Filter by status or keyword to manage bug tracking and resolution.

Instructions

List bugs assigned to me under a product. Defaults to active bugs only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
productIdYesProduct ID (required)
keywordNoKeyword filter on bug title
statusNoStatus filter (e.g., active)
allStatusesNoInclude non-active bugs
limitNoMax items

Implementation Reference

  • Handler implementation for the 'getMyBugs' tool within the CallToolRequestSchema handler. Extracts arguments, invokes fetchBugsByProduct helper, and formats the response as JSON.
    if (name === "getMyBugs") {
      const { productId, keyword, status, allStatuses = false, limit = 20 } = args;
      const { bugs, raw } = await fetchBugsByProduct({
        productId,
        keyword,
        allStatuses,
        status,
        limit,
      });
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({ bugs, raw }, null, 2),
          },
        ],
      };
    }
  • Registration of the 'getMyBugs' tool in the ListToolsRequestSchema response, including name, description, and input schema.
    {
      name: "getMyBugs",
      description:
        "List bugs assigned to me under a product. Defaults to active bugs only.",
      inputSchema: {
        type: "object",
        properties: {
          productId: { type: "number", description: "Product ID (required)" },
          keyword: { type: "string", description: "Keyword filter on bug title" },
          status: { type: "string", description: "Status filter (e.g., active)" },
          allStatuses: {
            type: "boolean",
            description: "Include non-active bugs",
            default: false,
          },
          limit: { type: "number", description: "Max items", default: 20 },
        },
        required: ["productId"],
        additionalProperties: false,
      },
    },
  • Core helper function fetchBugsByProduct that queries ZenTao API for bugs in a product, filters by assignee matching current account, keyword, and status.
    async function fetchBugsByProduct({
      productId,
      keyword,
      allStatuses = false,
      status,
      limit = 20,
      page = 1,
    }) {
      const res = await callZenTao({
        // Use /bugs with product filter; works better for assignedTo filtering.
        path: "bugs",
        query: {
          page,
          limit,
          product: productId,
          keywords: keyword,
        },
      });
      const bugs = extractArray(res.data, ["bugs"]);
      const accountLower = (account || "").trim().toLowerCase();
      const statusLower = status ? String(status).trim().toLowerCase() : null;
      const filtered = bugs.filter((bug) => {
        const assignedCandidates = [
          ...normalizeAccount(bug.assignedTo),
          ...normalizeAccount(bug.assignedToName),
          ...normalizeAccount(bug.assignedToRealname),
        ];
        const matchAssignee = accountLower
          ? assignedCandidates.includes(accountLower)
          : true;
        const matchKeyword = keyword
          ? `${bug.title || bug.name || ""}`
          .toLowerCase()
          .includes(keyword.toLowerCase())
          : true;
        const matchStatus = allStatuses
          ? true
          : statusLower
          ? String(bug.status || bug.state || "")
              .trim()
              .toLowerCase() === statusLower
          : true;
        return matchAssignee && matchKeyword && matchStatus;
      });
      return { bugs: filtered, raw: res.data };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions default behavior ('Defaults to active bugs only'), which adds some context, but fails to disclose critical behavioral traits such as whether this is a read-only operation, if it requires authentication, any rate limits, pagination details, or what the output format looks like. This leaves significant gaps for an AI agent to understand how to handle the tool effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single sentence that front-loads the core purpose and includes a key behavioral note. Every word earns its place, making it efficient and easy to parse without any wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 5 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral aspects like authentication needs, error handling, or return values, which are crucial for an AI agent to use the tool correctly in a real-world context. The high parameter count and absence of structured support make this description insufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already documents all parameters thoroughly. The description adds minimal value by implying filtering on 'active bugs' (related to 'status' and 'allStatuses'), but doesn't provide additional semantics beyond what's in the schema, such as explaining interactions between parameters or usage examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('bugs assigned to me under a product'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'getBugDetail' or 'searchProducts', which would require mentioning unique aspects like personal assignment filtering.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by specifying 'assigned to me' and 'Defaults to active bugs only', which suggests context for when to use it (e.g., for personal bug tracking). However, it doesn't provide explicit guidance on when to choose this tool over alternatives like 'getBugStats' or 'searchProducts', nor does it mention any exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Valiant-Cat/zentao-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server