Skip to main content
Glama
badchars

osint-mcp-server

by badchars

shodan_exploits

Search Shodan's exploit database to find public security vulnerabilities and exploits using queries like software names or CVE IDs.

Instructions

Search Shodan's exploit database for public exploits matching a query. Requires SHODAN_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesExploit search query (e.g. 'apache 2.4' or CVE ID)
typeNoFilter by exploit type (e.g. 'exploit', 'metasploit')

Implementation Reference

  • The handler function for shodan_exploits, which fetches exploit data from the Shodan API.
    export async function shodanExploits(query: string, apiKey: string, type?: string): Promise<ShodanExploitResult> {
      await limiter.acquire();
      const params = new URLSearchParams({ query, key: apiKey });
      if (type) params.set("type", type);
    
      const res = await fetch(`https://exploits.shodan.io/api/search?${params}`);
      if (!res.ok) throw new Error(`Shodan exploit search failed: ${res.status}`);
      const data = await res.json();
    
      return {
        total: data.total ?? 0,
        matches: (data.matches ?? []).map((m: any) => ({
          title: m.description ?? m.title ?? "",
          source: m.source ?? "",
          type: m.type,
          author: m.author,
          date: m.date,
          cve: m.cve,
        })),
      };
  • The tool registration and execution wrapper for shodan_exploits.
    const shodanExploitsTool: ToolDef = {
      name: "shodan_exploits",
      description: "Search Shodan's exploit database for public exploits matching a query. Requires SHODAN_API_KEY.",
      schema: {
        query: z.string().describe("Exploit search query (e.g. 'apache 2.4' or CVE ID)"),
        type: z.string().optional().describe("Filter by exploit type (e.g. 'exploit', 'metasploit')"),
      },
      execute: async (args, ctx) => {
        const key = requireApiKey(ctx.config.shodanApiKey, "Shodan", "SHODAN_API_KEY");
        return json(await shodanExploits(args.query as string, key, args.type as string | undefined));
      },
    };
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the API key requirement, which is a useful auth need, but fails to describe other critical traits such as rate limits, pagination behavior, or what the search returns (e.g., format, scope). For a search tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves beyond the basic action.

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 appropriately sized and front-loaded, consisting of two concise sentences that directly state the tool's purpose and key requirement. There is zero waste or redundancy, making it efficient and easy to parse for an AI agent.

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 moderate complexity (search with two parameters), no annotations, and no output schema, the description is minimally adequate. It covers the basic action and auth need but lacks details on behavioral traits, output format, and usage guidelines. This results in a description that is complete enough to understand the tool's intent but leaves gaps in practical implementation.

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 description coverage is 100%, so the schema already documents both parameters ('query' and 'type') with descriptions. The description adds no additional parameter semantics beyond what's in the schema, such as examples for the 'type' filter or query syntax details. This meets the baseline of 3 when the schema does the heavy lifting, but doesn't compensate with extra value.

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 tool's purpose as 'Search Shodan's exploit database for public exploits matching a query,' specifying the verb ('search'), resource ('Shodan's exploit database'), and target ('public exploits'). It distinguishes from siblings like 'shodan_host' or 'shodan_search' by focusing on exploits rather than general host or search data. However, it doesn't explicitly differentiate from other exploit-related tools if any existed in the sibling list, which is why it's not a 5.

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 when searching for exploits, but provides no explicit guidance on when to use this tool versus alternatives like 'shodan_search' or other exploit databases. It mentions the prerequisite 'Requires SHODAN_API_KEY,' which is useful context, but lacks clear when/when-not scenarios or named alternatives, leaving usage somewhat inferred rather than explicitly defined.

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/badchars/osint-mcp-server'

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