Skip to main content
Glama

training.import_htb

Import HackTheBox challenge data into the VulneraMCP platform to create training materials for vulnerability testing and exploit development.

Instructions

Import training data from HackTheBox challenge

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
challengeNameYesName of the HTB challenge
challengeUrlNoURL of the challenge
vulnerabilityTypeYesType of vulnerability
exploitYesExploit data with payloads and steps

Implementation Reference

  • Registration of the 'training.import_htb' tool, including schema and inline handler function.
    'training.import_htb', { description: 'Import training data from HackTheBox challenge', inputSchema: { type: 'object', properties: { challengeName: { type: 'string', description: 'Name of the HTB challenge' }, challengeUrl: { type: 'string', description: 'URL of the challenge' }, vulnerabilityType: { type: 'string', description: 'Type of vulnerability' }, exploit: { type: 'object', description: 'Exploit data with payloads and steps' }, }, required: ['challengeName', 'vulnerabilityType', 'exploit'], }, }, async (params: any): Promise<ToolResult> => { try { const exploit = params.exploit; const payloads = exploit.payloads || [exploit.payload || '']; const results: any[] = []; for (const payload of payloads) { const id = await saveTrainingData( 'htb', params.challengeName, params.vulnerabilityType, params.challengeUrl || '', payload, exploit.successPattern || 'flag', exploit.failurePattern || 'error', { exploit, challengeUrl: params.challengeUrl }, exploit.score || 8 ); results.push(id); } return formatToolResult(true, { imported: results.length, ids: results, }); } catch (error: any) { return formatToolResult(false, null, error.message); } } );
  • The handler function that executes the tool logic: extracts payloads from HTB exploit object, saves each as training data via saveTrainingData, and returns import results.
    async (params: any): Promise<ToolResult> => { try { const exploit = params.exploit; const payloads = exploit.payloads || [exploit.payload || '']; const results: any[] = []; for (const payload of payloads) { const id = await saveTrainingData( 'htb', params.challengeName, params.vulnerabilityType, params.challengeUrl || '', payload, exploit.successPattern || 'flag', exploit.failurePattern || 'error', { exploit, challengeUrl: params.challengeUrl }, exploit.score || 8 ); results.push(id); } return formatToolResult(true, { imported: results.length, ids: results, }); } catch (error: any) { return formatToolResult(false, null, error.message); } }
  • Input schema for the training.import_htb tool defining required parameters: challengeName, vulnerabilityType, exploit object.
    inputSchema: { type: 'object', properties: { challengeName: { type: 'string', description: 'Name of the HTB challenge' }, challengeUrl: { type: 'string', description: 'URL of the challenge' }, vulnerabilityType: { type: 'string', description: 'Type of vulnerability' }, exploit: { type: 'object', description: 'Exploit data with payloads and steps' }, }, required: ['challengeName', 'vulnerabilityType', 'exploit'], },

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