training.get
Retrieve training data for learning security vulnerability patterns from sources like HTB and PortSwigger to improve bug bounty hunting skills.
Instructions
Retrieve training data for learning patterns
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vulnerabilityType | No | Filter by vulnerability type | |
| source | No | Filter by source (htb, portswigger) | |
| limit | No | Maximum number of results |
Implementation Reference
- src/tools/training.ts:148-157 (handler)Handler function that executes the 'training.get' tool logic: fetches training data from the PostgreSQL database using filters and returns formatted results or error message.async ({ vulnerabilityType, source, limit = 100 }: any): Promise<ToolResult> => { try { const data = await getTrainingData(vulnerabilityType, source, limit); return formatToolResult(true, { trainingData: data, count: data.length, }); } catch (error: any) { return formatToolResult(false, null, error.message); }
- src/tools/training.ts:139-146 (schema)Input schema for the 'training.get' tool, defining optional parameters for filtering training data.inputSchema: { type: 'object', properties: { vulnerabilityType: { type: 'string', description: 'Filter by vulnerability type' }, source: { type: 'string', description: 'Filter by source (htb, portswigger)' }, limit: { type: 'number', description: 'Maximum number of results', default: 100 }, }, },
- src/tools/training.ts:135-159 (registration)Direct registration of the 'training.get' tool using server.tool(), including schema and handler.server.tool( 'training.get', { description: 'Retrieve training data for learning patterns', inputSchema: { type: 'object', properties: { vulnerabilityType: { type: 'string', description: 'Filter by vulnerability type' }, source: { type: 'string', description: 'Filter by source (htb, portswigger)' }, limit: { type: 'number', description: 'Maximum number of results', default: 100 }, }, }, }, async ({ vulnerabilityType, source, limit = 100 }: any): Promise<ToolResult> => { try { const data = await getTrainingData(vulnerabilityType, source, limit); return formatToolResult(true, { trainingData: data, count: data.length, }); } catch (error: any) { return formatToolResult(false, null, error.message); } } );
- src/index.ts:47-47 (registration)Top-level call to registerTrainingTools which includes the 'training.get' tool registration.registerTrainingTools(server);