Skip to main content
Glama

db.get_findings

Retrieve bug bounty findings from the database to analyze vulnerabilities, filter by target, and manage security testing results.

Instructions

Retrieve bug findings from the database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNoFilter by target
limitNoMaximum number of results

Implementation Reference

  • Registration of the 'db.get_findings' MCP tool, including input schema and inline handler function that delegates to getFindings helper.
    server.tool(
      'db.get_findings',
      {
        description: 'Retrieve bug findings from the database',
        inputSchema: {
          type: 'object',
          properties: {
            target: { type: 'string', description: 'Filter by target' },
            limit: { type: 'number', description: 'Maximum number of results', default: 100 },
          },
        },
      },
      async ({ target, limit = 100 }: any): Promise<ToolResult> => {
        try {
          const findings = await getFindings(target, limit);
          return formatToolResult(true, {
            findings,
            count: findings.length,
          });
        } catch (error: any) {
          return formatToolResult(false, null, error.message);
        }
      }
    );
  • Inline handler function for the db.get_findings tool that fetches findings from database helper and returns formatted ToolResult.
    async ({ target, limit = 100 }: any): Promise<ToolResult> => {
      try {
        const findings = await getFindings(target, limit);
        return formatToolResult(true, {
          findings,
          count: findings.length,
        });
      } catch (error: any) {
        return formatToolResult(false, null, error.message);
      }
    }
  • Input schema for the db.get_findings tool defining parameters target and limit.
    inputSchema: {
      type: 'object',
      properties: {
        target: { type: 'string', description: 'Filter by target' },
        limit: { type: 'number', description: 'Maximum number of results', default: 100 },
      },
    },
  • Database helper function getFindings that executes SQL query to retrieve findings from PostgreSQL findings table.
    export async function getFindings(
      target?: string,
      limit: number = 100
    ): Promise<Finding[]> {
      const client = await initPostgres().connect();
      try {
        let query = 'SELECT * FROM findings';
        const params: any[] = [];
        
        if (target) {
          query += ' WHERE target = $1';
          params.push(target);
        }
        
        query += ' ORDER BY timestamp DESC LIMIT $' + (params.length + 1);
        params.push(limit);
    
        const result: QueryResult = await client.query(query, params);
            return result.rows.map((row: any) => ({
          id: row.id.toString(),
          target: row.target,
          type: row.type,
          severity: row.severity,
          description: row.description,
          payload: row.payload,
          response: row.response,
          timestamp: row.timestamp,
          score: row.score,
        }));
      } finally {
        client.release();
      }
    }
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 of behavioral disclosure. It states 'Retrieve bug findings' but doesn't clarify aspects like whether this is a read-only operation, if it requires authentication, how results are returned (e.g., pagination), or any rate limits. This leaves significant gaps in understanding the tool's behavior.

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

Conciseness4/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 purpose without unnecessary words. It's front-loaded and easy to parse, though it could be slightly more informative without sacrificing brevity.

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 incomplete. It doesn't cover behavioral traits, return values, or usage context, making it insufficient for a tool that retrieves data from a database with parameters, despite the clear schema coverage.

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, with clear documentation for 'target' (filter by target) and 'limit' (maximum number of results). The description doesn't add any meaning beyond this, such as explaining what 'target' refers to or usage examples, but the schema provides adequate baseline information.

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 ('Retrieve') and resource ('bug findings from the database'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'db.get_statistics' or 'db.get_test_results', which might also retrieve data from the database but for different resources.

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. It doesn't mention sibling tools like 'db.get_statistics' or 'db.save_finding', nor does it specify contexts or prerequisites for retrieving bug findings, leaving usage unclear.

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/telmon95/VulneraMCP'

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