Skip to main content
Glama

rdms_get_my_bugs

Retrieve bugs assigned to you from Zentao bug tracking systems. Filter by status and set a result limit to streamline bug management.

Instructions

Get bugs assigned to current user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results
statusNoFilter by statusactive

Implementation Reference

  • The primary handler function that executes the rdms_get_my_bugs tool. It ensures login, fetches the user's assigned bugs from the RDMS 'my bugs' page, and parses the HTML response using parseBugList.
    async getMyBugs(status = 'active', limit = 20) {
      await this.ensureLoggedIn();
      try {
        const myBugsUrl = `${this.baseUrl}/index.php?m=my&f=work&mode=bug&type=assignedTo`;
        const response = await this.client.get(myBugsUrl);
        return this.parseBugList(response.data, limit, '我的BUG');
      } catch (error) {
        return { success: false, error: error.message, bugs: [] };
      }
    }
  • Input schema for the rdms_get_my_bugs tool defining optional status and limit parameters.
    inputSchema: {
      type: 'object',
      properties: {
        status: { type: 'string', description: 'Filter by status', default: 'active' },
        limit: { type: 'number', description: 'Max results', default: 20 }
      }
    }
  • index.js:102-112 (registration)
    Tool registration object defining name, description, and schema, added to the MCP server's tools list.
    {
      name: 'rdms_get_my_bugs',
      description: 'Get bugs assigned to current user',
      inputSchema: {
        type: 'object',
        properties: {
          status: { type: 'string', description: 'Filter by status', default: 'active' },
          limit: { type: 'number', description: 'Max results', default: 20 }
        }
      }
    },
  • Dispatch case in the MCP request handler that invokes the getMyBugs function for this tool.
    case 'rdms_get_my_bugs':
      return { content: [{ type: 'text', text: JSON.stringify(await this.getMyBugs(args.status, args.limit)) }] };
  • Shared helper method that parses RDMS HTML bug list pages into structured JSON, extracting bug IDs, titles, priorities, etc. Called by getMyBugs.
    parseBugList(html, limit = 20, type = 'BUG') {
      const $ = cheerio.load(html);
      const bugs = [];
      
      // 查找Bug链接 - 修正选择器
      const bugLinks = $('a[href*="m=bug&f=view&bugID="]');
      
      bugLinks.each((index, link) => {
        if (index >= limit) return false;
        
        const $link = $(link);
        const href = $link.attr('href');
        const title = $link.text().trim();
        
        // 提取Bug ID - 修正正则表达式
        const match = href.match(/bugID=(\d+)/);
        const bugId = match ? match[1] : '';
        
        // 获取当前行的其他信息
        const $row = $link.closest('tr');
        const severity = $row.find('.label-severity-custom').text().trim() || 
                        $row.find('[title*="严重程度"]').text().trim();
        const priority = $row.find('.label-pri').text().trim();
        const reporter = $row.find('td').eq(6).text().trim(); // 创建者列
        const resolver = $row.find('td').eq(8).text().trim(); // 解决者列
        const resolution = $row.find('td').eq(9).text().trim(); // 方案列
        
        // 只处理有效的Bug
        if (bugId && parseInt(bugId) > 0 && title && title.length > 0) {
          bugs.push({
            id: bugId,
            title: title,
            status: '', // 状态信息在这个页面中不直接显示
            priority: priority,
            severity: severity,
            assignedTo: '', // 当前用户就是被指派人
            reporter: reporter,
            resolver: resolver,
            resolution: resolution,
            created: '',
            url: href.startsWith('http') ? href : `${this.baseUrl}${href.replace(/^\.\//, '')}`
          });
        }
      });
      
      // 如果找到Bug,返回结果
      if (bugs.length > 0) {
        return {
          success: true,
          total: bugs.length,
          bugs: bugs,
          type: type,
          message: `找到 ${bugs.length} 个${type}`
        };
      }
      
      // 检查是否显示"暂时没有Bug"
      const emptyTip = $('.table-empty-tip').text().trim();
      if (emptyTip.includes('暂时没有Bug')) {
        return {
          success: true,
          total: 0,
          bugs: [],
          type: type,
          message: `暂无${type}`
        };
      }
      
      // 默认返回空结果
      return {
        success: true,
        total: 0,
        bugs: [],
        type: type,
        message: `暂无${type}`
      };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves bugs but doesn't mention whether this is a read-only operation, if it requires authentication, what the return format looks like, or any rate limits. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 a single, efficient sentence that directly states the tool's function without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse while conveying the essential purpose.

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 lack of annotations and output schema, the description is insufficiently complete. It doesn't explain what the tool returns (e.g., bug details, list format), error conditions, or behavioral constraints. For a tool with two parameters and no structured output documentation, more context is needed for effective use.

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?

The input schema has 100% description coverage, clearly documenting both parameters with defaults and types. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline of 3 where the schema does the heavy lifting without compensating for gaps.

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 action ('Get') and resource ('bugs assigned to current user'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'rdms_get_my_market_bugs' which appears to serve a similar purpose for a different bug type, leaving room for improvement in sibling distinction.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'rdms_get_my_market_bugs' or 'rdms_get_bug'. It lacks context about prerequisites, exclusions, or typical scenarios for usage, offering only a basic functional statement without operational context.

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/ad19900913/mcp-rdms'

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