Skip to main content
Glama
Cyreslab-AI

Shodan MCP Server

get_newest_cves

Retrieve recently published vulnerabilities from the CVE database to identify potential security threats and prioritize patching efforts.

Instructions

Get the newest vulnerabilities from the CVE database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (default: 10)

Implementation Reference

  • MCP CallToolRequestSchema handler case for 'get_newest_cves' tool. Parses optional 'limit' parameter, invokes CVEDBClient.getNewestCves(), formats and returns JSON response, handles errors.
    case "get_newest_cves": {
      const limit = request.params.arguments?.limit ? Number(request.params.arguments.limit) : 10;
    
      try {
        const newestCves = await cvedbClient.getNewestCves(limit);
        return {
          content: [{
            type: "text",
            text: JSON.stringify(newestCves, null, 2)
          }]
        };
      } catch (error) {
        if (error instanceof McpError) {
          throw error;
        }
        throw new McpError(
          ErrorCode.InternalError,
          `Error getting newest CVEs: ${(error as Error).message}`
        );
      }
    }
  • Core implementation in CVEDBClient class: makes HTTP GET request to 'https://cvedb.shodan.io/cves?limit=N' to fetch newest CVEs, returns response data, handles API errors.
    async getNewestCves(limit: number = 10): Promise<any> {
      try {
        const response = await this.axiosInstance.get("/cves", {
          params: { limit }
        });
        return response.data;
      } catch (error: unknown) {
        if (axios.isAxiosError(error)) {
          throw new McpError(
            ErrorCode.InternalError,
            `CVEDB API error: ${error.response?.data?.error || error.message}`
          );
        }
        throw error;
      }
    }
  • src/index.ts:1240-1251 (registration)
    Tool registration entry in ListToolsRequestSchema response array defining name, description, and input schema for 'get_newest_cves'.
      name: "get_newest_cves",
      description: "Get the newest vulnerabilities from the CVE database",
      inputSchema: {
        type: "object",
        properties: {
          limit: {
            type: "number",
            description: "Maximum number of results to return (default: 10)"
          }
        }
      }
    },
  • Input schema definition for 'get_newest_cves' tool: optional 'limit' number parameter.
    inputSchema: {
      type: "object",
      properties: {
        limit: {
          type: "number",
          description: "Maximum number of results to return (default: 10)"
        }
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Get' implies a read operation, it doesn't specify whether this is a real-time query, cached data, rate-limited, or what format the results return. For a database query tool with zero annotation coverage, this leaves significant behavioral gaps.

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 states the core purpose without unnecessary words. It's appropriately sized for a simple query tool and front-loads the essential information, making every word earn 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?

For a single-parameter query tool with good schema coverage but no annotations or output schema, the description is minimally adequate. It states what the tool does but lacks important context about result format, freshness guarantees, or how it differs from similar tools, leaving the agent with incomplete operational understanding.

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

Parameters3/5

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

The description mentions no parameters, but the input schema has 100% description coverage for its single parameter 'limit'. The schema already documents it as 'Maximum number of results to return (default: 10)', so the description doesn't need to add parameter semantics. Baseline 3 is appropriate when schema does the heavy lifting.

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 action ('Get') and resource ('newest vulnerabilities from the CVE database'), making the tool's purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'search_cves' or 'get_cves_by_epss', which would require more specific scope definition for 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 like 'search_cves' or 'get_cves_by_epss'. There's no mention of prerequisites, timing considerations, or exclusion criteria, leaving the agent to infer usage context from the tool name alone.

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