Skip to main content
Glama

list_search_facets

Discover available search filters to refine Shodan queries for cybersecurity research and threat intelligence.

Instructions

List all available search facets that can be used with Shodan queries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP server tool handler for 'list_search_facets' that calls ShodanClient.listSearchFacets() and returns the JSON-formatted facets list.
    case "list_search_facets": { try { const facets = await shodanClient.listSearchFacets(); return { content: [{ type: "text", text: JSON.stringify(facets, null, 2) }] }; } catch (error) { if (error instanceof McpError) { throw error; } throw new McpError( ErrorCode.InternalError, `Error listing search facets: ${(error as Error).message}` ); } }
  • ShodanClient method that performs the actual API call to retrieve available search facets from Shodan.
    async listSearchFacets(): Promise<any> { try { const response = await this.axiosInstance.get("/shodan/host/search/facets"); return { facets: response.data }; } catch (error: unknown) { if (axios.isAxiosError(error)) { throw new McpError( ErrorCode.InternalError, `Shodan API error: ${error.response?.data?.error || error.message}` ); } throw error; } }
  • src/index.ts:1026-1032 (registration)
    Tool registration in ListToolsRequestSchema handler, defining name, description, and empty input schema.
    name: "list_search_facets", description: "List all available search facets that can be used with Shodan queries", inputSchema: { type: "object", properties: {} } },
  • Input schema for the 'list_search_facets' tool (empty object, no parameters required).
    type: "object", properties: {} } },

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/shodan-mcp-server'

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