Skip to main content
Glama
Cyreslab-AI

Shodan MCP Server

get_api_info

Retrieve your Shodan API plan details including available credits and usage limits to manage cybersecurity research queries.

Instructions

Get information about your API plan including credits and limits

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_api_info' tool in the CallToolRequestSchema switch statement. It calls shodanClient.getApiInfo() and returns the formatted JSON response.
    case "get_api_info": {
      try {
        const apiInfo = await shodanClient.getApiInfo();
        return {
          content: [{
            type: "text",
            text: JSON.stringify(apiInfo, null, 2)
          }]
        };
      } catch (error) {
        if (error instanceof McpError) {
          throw error;
        }
        throw new McpError(
          ErrorCode.InternalError,
          `Error getting API info: ${(error as Error).message}`
        );
      }
    }
  • src/index.ts:1072-1078 (registration)
    Registration of the 'get_api_info' tool in the ListToolsRequestSchema handler, defining its name, description, and empty input schema (no parameters required).
      name: "get_api_info",
      description: "Get information about your API plan including credits and limits",
      inputSchema: {
        type: "object",
        properties: {}
      }
    },
  • The core helper method in ShodanClient class that makes the API call to Shodan's /api-info endpoint to retrieve API plan information, handling errors appropriately.
    async getApiInfo(): Promise<any> {
      try {
        const response = await this.axiosInstance.get("/api-info");
        return 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;
      }
    }
  • The input schema for the 'get_api_info' tool, which is an empty object since no parameters are required.
        type: "object",
        properties: {}
      }
    },
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions retrieving 'credits and limits,' which implies a read-only operation, but doesn't disclose behavioral traits like authentication requirements, rate limits, error conditions, or response format. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 fluff or wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 output schema), the description is minimally adequate but lacks completeness. Without annotations or output schema, it should ideally mention response structure or key behavioral aspects to fully guide the agent, leaving room for improvement.

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%, so there's no need for parameter details in the description. The description appropriately avoids redundant information, earning a high baseline score for not overloading with unnecessary content.

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 verb ('Get') and resource ('information about your API plan including credits and limits'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_account_profile' which might also return account-related information, preventing a perfect score.

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. With siblings like 'get_account_profile' that might overlap in scope, there's no explicit or implied context for choosing this tool, leaving the agent without usage direction.

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