Skip to main content
Glama
Cyreslab-AI

Shodan MCP Server

list_protocols

Discover available protocols for conducting Internet scans to identify devices and services for cybersecurity analysis and threat intelligence gathering.

Instructions

List all protocols that can be used when performing on-demand Internet scans

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the 'list_protocols' tool within the CallToolRequestSchema switch statement. It invokes the ShodanClient's listProtocols method and returns the formatted JSON response.
    case "list_protocols": {
      try {
        const protocols = await shodanClient.listProtocols();
        return {
          content: [{
            type: "text",
            text: JSON.stringify(protocols, null, 2)
          }]
        };
      } catch (error) {
        if (error instanceof McpError) {
          throw error;
        }
        throw new McpError(
          ErrorCode.InternalError,
          `Error listing protocols: ${(error as Error).message}`
        );
      }
    }
  • Schema definition and registration of the 'list_protocols' tool in the ListToolsRequestSchema handler response. It defines the tool name, description, and empty input schema (no parameters required).
      name: "list_protocols",
      description: "List all protocols that can be used when performing on-demand Internet scans",
      inputSchema: {
        type: "object",
        properties: {}
      }
    },
  • Helper method in the ShodanClient class that performs the actual API call to Shodan's /shodan/protocols endpoint to retrieve the list of available protocols.
    async listProtocols(): Promise<any> {
      try {
        const response = await this.axiosInstance.get("/shodan/protocols");
        return { protocols: 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;
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states what the tool does, not how it behaves. It doesn't disclose whether this is a read-only operation, if it requires authentication, rate limits, pagination, or what format the output takes. The description is minimal and lacks behavioral context.

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 any redundant information. It's appropriately sized for a simple listing tool with no parameters, and every word earns its place.

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 simplicity (0 parameters, no annotations, no output schema), the description is complete enough to understand its basic purpose. However, it lacks details on output format, behavioral traits, or integration with sibling tools, which could be helpful for an agent despite the low complexity.

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 with 100% schema description coverage, so the schema fully documents the absence of inputs. The description doesn't need to add parameter information, and it correctly implies no filtering or options are needed, aligning with the empty schema. Baseline is 4 for zero parameters.

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 protocols') and resource ('protocols that can be used when performing on-demand Internet scans'), distinguishing it from siblings like list_ports or list_search_facets. It precisely defines the scope of what's being listed.

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 ('when performing on-demand Internet scans'), suggesting this tool provides protocol options for scan operations. However, it doesn't explicitly state when to use this versus alternatives like scan_network_range or how it relates to other listing tools, leaving some ambiguity.

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