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(); } }

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