Skip to main content
Glama

training.stats

Analyze test results and training data statistics to track vulnerability assessment progress and identify patterns in security testing.

Instructions

Get statistics about test results and training data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the 'training.stats' tool. It retrieves test statistics using getTestStatistics(), counts training data entries, and calculates the average success rate across stats.
    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); } }
  • Direct registration of the 'training.stats' tool within the registerTrainingTools function using server.tool(). Includes inline schema (empty input) and handler.
    server.tool( '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)
    Top-level registration call to registerTrainingTools(server), which includes the 'training.stats' tool registration.
    registerTrainingTools(server);
  • src/index.ts:23-23 (registration)
    Import of registerTrainingTools function used to register training tools including 'training.stats'.
    import { registerTrainingTools } from './tools/training';

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