Skip to main content
Glama
Cyreslab-AI

Shodan MCP Server

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: {}
      }
    },
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It indicates a read-only operation ('List all available'), but does not specify aspects like rate limits, authentication needs, or return format. The description is accurate but lacks depth for a tool with zero annotation coverage.

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, well-structured sentence that efficiently conveys the tool's purpose without any wasted words. It is front-loaded with the core action and resource, making it highly concise and effective.

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's low complexity (0 parameters, no output schema, no annotations), the description is adequate but minimal. It explains what the tool does but lacks details on behavioral traits or output format, which could be helpful despite the simplicity. It meets basic needs but has room for improvement in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100% (empty schema). The description does not need to add parameter details, so it meets the baseline of 4 for tools with no parameters, as it appropriately focuses on the tool's purpose without redundant information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('List all available') and resource ('search facets'), and distinguishes it from siblings by specifying they are 'for use with Shodan queries.' This provides precise differentiation from tools like 'list_search_filters' or 'list_protocols.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context ('that can be used with Shodan queries'), suggesting it's for query-building preparation. However, it lacks explicit guidance on when to use this tool versus alternatives like 'list_search_filters' or 'parse_search_tokens,' and does not mention prerequisites or exclusions.

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

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