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 } ];

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