Skip to main content
Glama

get_site_map

Retrieve and analyze the site structure identified during scanning and browsing. Filter by host, URLs with parameters, and limit results.

Instructions

Get the site structure discovered during scanning and browsing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNoFilter by host (optional)
limitNoMaximum number of items to return (default: 20)
with_parametersNoOnly show URLs with parameters (optional)

Implementation Reference

  • Handler for the 'get_site_map' tool. Filters the mock site map data by host, whether to include only items with parameters, and limit, then returns a JSON summary of the filtered items.
    case "get_site_map": {
      const host = request.params.arguments?.host as string | undefined;
      const withParameters = request.params.arguments?.with_parameters as boolean | undefined;
      const limit = Number(request.params.arguments?.limit || 20);
    
      let siteMap = [...mockSiteMap];
    
      // Apply filters
      if (host) {
        siteMap = siteMap.filter(item => new URL(item.url).hostname.includes(host));
      }
    
      if (withParameters) {
        siteMap = siteMap.filter(item => item.parameters);
      }
    
      // Apply limit
      siteMap = siteMap.slice(0, limit);
    
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            total_items: siteMap.length,
            items: siteMap
          }, null, 2)
        }]
      };
    }
  • src/index.ts:459-479 (registration)
    Registration of the 'get_site_map' tool in the listTools handler, including name, description, and input schema.
    {
      name: "get_site_map",
      description: "Get the site structure discovered during scanning and browsing",
      inputSchema: {
        type: "object",
        properties: {
          host: {
            type: "string",
            description: "Filter by host (optional)"
          },
          with_parameters: {
            type: "boolean",
            description: "Only show URLs with parameters (optional)"
          },
          limit: {
            type: "number",
            description: "Maximum number of items to return (default: 20)"
          }
        }
      }
    }
  • TypeScript interface defining the structure of SiteMapItem used by the get_site_map tool.
    interface SiteMapItem {
      id: string;
      url: string;
      method: string;
      statusCode: number;
      mimeType: string;
      size: number;
      parameters: boolean;
    }
  • Mock site map data array used as the data source for the get_site_map tool implementation.
    const mockSiteMap: SiteMapItem[] = [
      {
        id: "1",
        url: "https://example.com/",
        method: "GET",
        statusCode: 200,
        mimeType: "text/html",
        size: 1256,
        parameters: false
      },
      {
        id: "2",
        url: "https://example.com/assets/style.css",
        method: "GET",
        statusCode: 200,
        mimeType: "text/css",
        size: 128,
        parameters: false
      },
      {
        id: "3",
        url: "https://example.com/login",
        method: "GET",
        statusCode: 200,
        mimeType: "text/html",
        size: 2048,
        parameters: false
      },
      {
        id: "4",
        url: "https://example.com/api/user",
        method: "POST",
        statusCode: 200,
        mimeType: "application/json",
        size: 512,
        parameters: true
      }
    ];
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. It states the tool retrieves 'site structure discovered during scanning and browsing,' implying a read-only operation, but doesn't specify if this is real-time data, cached results, or requires specific permissions. It also lacks details on output format, pagination, or error handling, which are critical for a tool with parameters like 'limit' and filtering options.

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: 'Get the site structure discovered during scanning and browsing.' It is front-loaded with the core purpose, uses clear language, and avoids unnecessary words. Every part of the sentence contributes directly to understanding the tool's function, making it highly concise and well-structured.

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?

Given the tool has 3 parameters with full schema coverage but no annotations or output schema, the description is minimally adequate. It covers the basic purpose but lacks context on behavioral aspects like data freshness, permissions, or output format. For a scanning-related tool that likely interacts with dynamic data, more details on how it integrates with siblings (e.g., after 'start_scan') would improve completeness, but it meets the minimum viable threshold.

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 clear documentation for 'host' (filter by host), 'limit' (maximum items), and 'with_parameters' (only show URLs with parameters). The description doesn't add any meaning beyond this, as it doesn't explain how these parameters affect the 'site structure' retrieval or provide usage examples. With high schema coverage, the baseline score of 3 is appropriate, as the schema handles 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 tool's purpose: 'Get the site structure discovered during scanning and browsing.' It specifies the verb ('Get') and resource ('site structure'), and distinguishes it from siblings like 'get_proxy_history' or 'get_scan_issues' by focusing on site structure rather than proxy logs or issues. However, it doesn't explicitly differentiate from 'get_scan_status' in terms of what 'site structure' entails versus 'status,' leaving some ambiguity.

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. It doesn't mention any prerequisites, such as needing a scan to have been performed first, or compare it to siblings like 'get_scan_status' for status updates or 'start_scan' for initiating scans. Without such context, users might struggle to choose the right tool in this scanning-related set.

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

Related 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/Cyreslab-AI/burpsuite-mcp-server'

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