Skip to main content
Glama

training.stats

Analyze test results and training data to identify patterns and improve vulnerability detection accuracy in bug bounty hunting.

Instructions

Get statistics about test results and training data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'training.stats' tool. It retrieves test statistics from the database, counts the number of training data entries, and calculates the average success rate across all test categories.
    try { const stats = await getTestStatistics(); const trainingCount = await getTrainingData(undefined, undefined, 1000); return formatToolResult(true, { testStatistics: stats, trainingDataCount: trainingCount.length, successRate: stats.reduce((acc: number, stat: any) => { const total = parseInt(stat.total_tests) || 0; const success = parseInt(stat.successful_tests) || 0; return total > 0 ? (success / total) * 100 : 0; }, 0) / stats.length, }); } catch (error: any) { return formatToolResult(false, null, error.message); } } );
  • Schema definition for the 'training.stats' tool, including description and empty input schema (no parameters required).
    description: 'Get statistics about test results and training data', inputSchema: { type: 'object', properties: {}, }, },
  • The server.tool() registration of the 'training.stats' tool within the registerTrainingTools function.
    'training.stats', { description: 'Get statistics about test results and training data', inputSchema: { type: 'object', properties: {}, }, }, async (): Promise<ToolResult> => { try { const stats = await getTestStatistics(); const trainingCount = await getTrainingData(undefined, undefined, 1000); return formatToolResult(true, { testStatistics: stats, trainingDataCount: trainingCount.length, successRate: stats.reduce((acc: number, stat: any) => { const total = parseInt(stat.total_tests) || 0; const success = parseInt(stat.successful_tests) || 0; return total > 0 ? (success / total) * 100 : 0; }, 0) / stats.length, }); } catch (error: any) { return formatToolResult(false, null, error.message); } } );
  • src/index.ts:47-47 (registration)
    Call to registerTrainingTools(server) in the main server initialization, which includes registration of 'training.stats'.
    registerTrainingTools(server);

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