Skip to main content
Glama

tech_detection

Identify technologies and frameworks used by websites to support security assessments and penetration testing workflows.

Instructions

Detect technologies used by target website

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesTarget URL

Implementation Reference

  • The core handler function for the 'tech_detection' tool. It performs HTTP requests to the target URL, analyzes response headers, HTML content, meta tags, and script sources to detect technologies, versions, and confidence levels.
    async techDetection(url: string): Promise<ScanResult> {
      try {
        const technologies: TechDetectionResult[] = [];
        
        // Make HTTP request to analyze headers and content
        const response = await axios.get(url, {
          timeout: 10000,
          headers: {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
          }
        });
        
        const headers = response.headers;
        const html = response.data;
        const $ = cheerio.load(html);
        
        // Detect technologies from headers
        this.detectFromHeaders(headers, technologies);
        
        // Detect technologies from HTML content
        this.detectFromHTML($, technologies);
        
        // Detect technologies from meta tags
        this.detectFromMetaTags($, technologies);
        
        // Detect technologies from script sources
        this.detectFromScripts($, technologies);
        
        return {
          target: url,
          timestamp: new Date().toISOString(),
          tool: 'tech_detection',
          results: {
            technologies,
            headers: headers,
            status_code: response.status,
            server_info: {
              server: headers.server || 'Unknown',
              powered_by: headers['x-powered-by'] || 'Unknown',
              generator: $('meta[name="generator"]').attr('content') || 'Unknown'
            }
          },
          status: 'success'
        };
      } catch (error) {
        return {
          target: url,
          timestamp: new Date().toISOString(),
          tool: 'tech_detection',
          results: {},
          status: 'error',
          error: error instanceof Error ? error.message : String(error)
        };
      }
    }
  • src/index.ts:511-512 (registration)
    MCP tool dispatch in the main server switch statement, calling the reconTools.techDetection handler.
    case "tech_detection":
      return respond(await this.reconTools.techDetection(args.url));
  • Input schema definition for the 'tech_detection' tool registered in MCP listTools handler.
      name: "tech_detection",
      description: "Detect technologies used by target website",
      inputSchema: {
        type: "object",
        properties: {
          url: { type: "string", description: "Target URL" }
        },
        required: ["url"]
      }
    },
  • TypeScript interface defining the structure of detected technologies in the tool's output.
    export interface TechDetectionResult {
      technology: string;
      version?: string;
      confidence: number;
      category: string;
    }
  • Helper function to detect web servers (Apache, Nginx, IIS) and backend technologies (PHP, ASP.NET) from HTTP response headers.
    private detectFromHeaders(headers: any, technologies: TechDetectionResult[]): void {
      // Server detection
      if (headers.server) {
        const server = headers.server.toLowerCase();
        if (server.includes('apache')) {
          technologies.push({
            technology: 'Apache HTTP Server',
            version: this.extractVersion(server, 'apache'),
            confidence: 100,
            category: 'Web Server'
          });
        } else if (server.includes('nginx')) {
          technologies.push({
            technology: 'Nginx',
            version: this.extractVersion(server, 'nginx'),
            confidence: 100,
            category: 'Web Server'
          });
        } else if (server.includes('iis')) {
          technologies.push({
            technology: 'Microsoft IIS',
            version: this.extractVersion(server, 'iis'),
            confidence: 100,
            category: 'Web Server'
          });
        }
      }
    
      // X-Powered-By detection
      if (headers['x-powered-by']) {
        const poweredBy = headers['x-powered-by'].toLowerCase();
        if (poweredBy.includes('php')) {
          technologies.push({
            technology: 'PHP',
            version: this.extractVersion(poweredBy, 'php'),
            confidence: 100,
            category: 'Programming Language'
          });
        } else if (poweredBy.includes('asp.net')) {
          technologies.push({
            technology: 'ASP.NET',
            version: this.extractVersion(poweredBy, 'asp.net'),
            confidence: 100,
            category: 'Web Framework'
          });
        }
      }
    }
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 of behavioral disclosure. While 'detect' implies a read-only operation, it doesn't specify whether this is passive or active scanning, potential rate limits, authentication requirements, or what the output looks like. For a security tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 purpose without unnecessary words. It's appropriately sized for a simple tool with one parameter and gets straight to the point with zero wasted verbiage.

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 the complexity of security testing tools and the lack of both annotations and output schema, the description is insufficiently complete. It doesn't explain what 'technologies' means (e.g., web frameworks, servers, CMS), how results are returned, or any limitations. For a tool in this domain with rich sibling alternatives, more context is needed for effective use.

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%, with the single parameter 'url' clearly documented as 'Target URL' in the schema. The description doesn't add any additional meaning beyond what the schema provides (e.g., URL format requirements, protocol restrictions, or example values), so it meets the baseline for adequate but unenhanced parameter documentation.

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 tool's purpose with a specific verb ('detect') and resource ('technologies used by target website'), making it immediately understandable. However, it doesn't differentiate itself from potential sibling tools like 'nikto_scan' or 'nmap_scan' that might also detect technologies, which prevents a perfect score.

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. With many sibling tools available for security testing (e.g., 'nmap_scan', 'nikto_scan', 'directory_scan'), there's no indication of whether this is for initial reconnaissance, specific technology fingerprinting, or how it differs from other detection methods.

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/adriyansyah-mf/mcp-pentest'

If you have feedback or need assistance with the MCP directory API, please join our Discord server