Skip to main content
Glama

training.import_all

Import pre-loaded training data from Intigriti, PortSwigger, and other sources to enhance security testing skills for bug bounty hunting.

Instructions

Import all pre-loaded training data from Intigriti, PortSwigger, and other sources

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourcesNoSources to import (csrf, xss, sqli, registration, dorking, all)

Implementation Reference

  • Handler function that imports specified training data sources (CSRF, XSS, SQLi, registration, dorking) from pre-loaded arrays into the database using saveTrainingData, returning import statistics.
      async ({ sources = ['all'] }: any): Promise<ToolResult> => {
        try {
          const allData: any[] = [];
          const importSources = sources.includes('all')
            ? ['csrf', 'xss', 'sqli', 'registration', 'dorking']
            : sources;
    
          if (importSources.includes('csrf')) {
            allData.push(...CSRF_TRAINING_DATA);
          }
          if (importSources.includes('xss')) {
            allData.push(...XSS_TRAINING_DATA);
          }
          if (importSources.includes('sqli')) {
            allData.push(...SQLI_TRAINING_DATA);
          }
          if (importSources.includes('registration')) {
            allData.push(...REGISTRATION_TRAINING_DATA);
          }
          if (importSources.includes('dorking')) {
            allData.push(...GOOGLE_DORKING_PATTERNS);
          }
    
          const imported: number[] = [];
          for (const data of allData) {
            try {
              const id = await saveTrainingData(
                data.source,
                data.sourceId,
                data.vulnerabilityType,
                data.targetPattern,
                data.payloadPattern,
                data.successPattern,
                data.failurePattern,
                data.contextData,
                data.score
              );
              imported.push(id);
            } catch (error: any) {
              console.error(`Error importing ${data.sourceId}:`, error.message);
            }
          }
    
          return formatToolResult(true, {
            imported: imported.length,
            total: allData.length,
            ids: imported,
            sources: importSources,
          });
        } catch (error: any) {
          return formatToolResult(false, null, error.message);
        }
      }
    );
  • Input schema defining optional 'sources' array parameter for selecting which training data sets to import.
    {
      description: 'Import all pre-loaded training data from Intigriti, PortSwigger, and other sources',
      inputSchema: {
        type: 'object',
        properties: {
          sources: {
            type: 'array',
            items: { type: 'string' },
            description: 'Sources to import (csrf, xss, sqli, registration, dorking, all)',
            default: ['all'],
          },
        },
      },
    },
  • Registration of the 'training.import_all' tool using server.tool(), including schema and handler.
    // Import all pre-loaded training data
    server.tool(
      'training.import_all',
      {
        description: 'Import all pre-loaded training data from Intigriti, PortSwigger, and other sources',
        inputSchema: {
          type: 'object',
          properties: {
            sources: {
              type: 'array',
              items: { type: 'string' },
              description: 'Sources to import (csrf, xss, sqli, registration, dorking, all)',
              default: ['all'],
            },
          },
        },
      },
      async ({ sources = ['all'] }: any): Promise<ToolResult> => {
        try {
          const allData: any[] = [];
          const importSources = sources.includes('all')
            ? ['csrf', 'xss', 'sqli', 'registration', 'dorking']
            : sources;
    
          if (importSources.includes('csrf')) {
            allData.push(...CSRF_TRAINING_DATA);
          }
          if (importSources.includes('xss')) {
            allData.push(...XSS_TRAINING_DATA);
          }
          if (importSources.includes('sqli')) {
            allData.push(...SQLI_TRAINING_DATA);
          }
          if (importSources.includes('registration')) {
            allData.push(...REGISTRATION_TRAINING_DATA);
          }
          if (importSources.includes('dorking')) {
            allData.push(...GOOGLE_DORKING_PATTERNS);
          }
    
          const imported: number[] = [];
          for (const data of allData) {
            try {
              const id = await saveTrainingData(
                data.source,
                data.sourceId,
                data.vulnerabilityType,
                data.targetPattern,
                data.payloadPattern,
                data.successPattern,
                data.failurePattern,
                data.contextData,
                data.score
              );
              imported.push(id);
            } catch (error: any) {
              console.error(`Error importing ${data.sourceId}:`, error.message);
            }
          }
    
          return formatToolResult(true, {
            imported: imported.length,
            total: allData.length,
            ids: imported,
            sources: importSources,
          });
        } catch (error: any) {
          return formatToolResult(false, null, error.message);
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states 'Import all pre-loaded training data' but doesn't disclose behavioral traits such as whether this is a read-only or destructive operation, what permissions are required, if it overwrites existing data, or how long it takes. For a tool with potential data mutation implications, 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 that directly states the tool's function without unnecessary words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

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

Completeness2/5

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

Given no annotations, no output schema, and a single parameter with full schema coverage, the description is incomplete. It doesn't explain what 'import' entails (e.g., data storage, format, success indicators) or behavioral aspects, which is inadequate for a tool that likely involves data processing or mutation.

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?

The input schema has 100% description coverage, with the 'sources' parameter documented as an array of strings with default values and examples. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline of 3 for high schema coverage without adding value.

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 verb 'Import' and the resource 'all pre-loaded training data from Intigriti, PortSwigger, and other sources', making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'training.import' or 'training.import_portswigger', which appear to be more specific import operations.

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 mentions 'all pre-loaded training data' but doesn't clarify if this is for bulk initialization, one-time setup, or other contexts, leaving usage ambiguous.

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