Skip to main content
Glama
Cyreslab-AI

Shodan MCP Server

get_cves_by_epss

Retrieve CVEs prioritized by EPSS exploit prediction scores to identify vulnerabilities with higher likelihood of exploitation for cybersecurity assessment.

Instructions

Get CVEs sorted by EPSS score (Exploit Prediction Scoring System)

Input Schema

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

Implementation Reference

  • MCP CallTool handler for get_cves_by_epss tool. Extracts limit parameter, calls CVEDBClient.getCvesByEpss, and returns JSON response or handles errors.
    case "get_cves_by_epss": {
      const limit = request.params.arguments?.limit ? Number(request.params.arguments.limit) : 10;
    
      try {
        const epssCves = await cvedbClient.getCvesByEpss(limit);
        return {
          content: [{
            type: "text",
            text: JSON.stringify(epssCves, null, 2)
          }]
        };
      } catch (error) {
        if (error instanceof McpError) {
          throw error;
        }
        throw new McpError(
          ErrorCode.InternalError,
          `Error getting CVEs by EPSS: ${(error as Error).message}`
        );
      }
    }
  • Core implementation in CVEDBClient that queries https://cvedb.shodan.io/cves API with sort_by_epss=true and limit parameters to fetch CVEs sorted by EPSS score.
    async getCvesByEpss(limit: number = 10): Promise<any> {
      try {
        const response = await this.axiosInstance.get("/cves", {
          params: { sort_by_epss: true, 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:1266-1277 (registration)
    Tool registration in ListTools handler, including name, description, and input schema definition.
      name: "get_cves_by_epss",
      description: "Get CVEs sorted by EPSS score (Exploit Prediction Scoring System)",
      inputSchema: {
        type: "object",
        properties: {
          limit: {
            type: "number",
            description: "Maximum number of results to return (default: 10)"
          }
        }
      }
    }
  • Input schema definition for the get_cves_by_epss tool.
    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, the description carries full burden but only states the basic function. It doesn't disclose behavioral traits such as data source, rate limits, authentication needs, or output format, leaving significant gaps for a tool that likely queries external data.

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 with no wasted words, clearly front-loading the core purpose. It's appropriately sized for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete. It lacks details on return values, error handling, or operational context, which are crucial for a data-fetching tool in a security context.

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?

Schema coverage is 100%, so the input schema fully documents the 'limit' parameter. The description adds no parameter-specific details beyond what the schema provides, meeting the baseline for high coverage.

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 ('CVEs'), specifying they are sorted by EPSS score. It distinguishes from siblings like 'get_cve_info' or 'search_cves' by focusing on EPSS-based sorting, though it doesn't explicitly contrast them.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_newest_cves' or 'search_cves'. The description implies usage for EPSS-sorted CVEs but lacks explicit context 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