Skip to main content
Glama

training.import_htb

Import HackTheBox challenge data into VulneraMCP for security training, including vulnerability types and exploit details to enhance bug bounty hunting capabilities.

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

  • Handler function that executes the tool logic: extracts payloads from HTB exploit data, saves each to training DB via saveTrainingData, returns import count and IDs.
        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 defining parameters for importing HTB training data: challengeName, challengeUrl, vulnerabilityType, and exploit object.
      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> => {
  • Registration of the 'training.import_htb' tool via server.tool() call within registerTrainingTools, including inline schema and handler.
        '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);
          }
        }
      );
    }
  • Helper function saveTrainingData that performs the actual database insertion of training data into the 'training_data' table.
    export async function saveTrainingData(
      source: string,
      sourceId: string,
      vulnerabilityType: string,
      targetPattern: string,
      payloadPattern: string,
      successPattern: string,
      failurePattern: string,
      contextData?: any,
      score?: number
    ): Promise<number> {
      const client = await initPostgres().connect();
      try {
        const result: QueryResult = await client.query(
          `INSERT INTO training_data (source, source_id, vulnerability_type, target_pattern, payload_pattern, success_pattern, failure_pattern, context_data, score)
           VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
           RETURNING id`,
          [
            source,
            sourceId,
            vulnerabilityType,
            targetPattern,
            payloadPattern,
            successPattern,
            failurePattern,
            JSON.stringify(contextData || {}),
            score || 0
          ]
        );
        return result.rows[0].id;
      } finally {
        client.release();
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('Import') but doesn't describe what happens during import (e.g., data transformation, validation, storage location), whether it's idempotent, what permissions are required, or what happens on failure. For a mutation tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a tool with good schema documentation and gets straight to the point without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is minimally adequate but has clear gaps. It states what the tool does but doesn't cover behavioral aspects, error conditions, or what happens after import. The 100% schema coverage helps, but more context about the import operation would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 4 parameters thoroughly. The description doesn't add any parameter-specific details beyond what's in the schema (like explaining relationships between parameters or providing examples). Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Import training data') and source ('from HackTheBox challenge'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'training.import', 'training.import_all', or 'training.import_portswigger', which appear to perform similar import functions from different sources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'training.import' or 'training.import_portswigger'. It doesn't mention prerequisites, constraints, or typical scenarios for importing HTB data versus other training sources.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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