Skip to main content
Glama

shodan-search

Search Shodan's database for hosts matching a query, with filters for port, country, product, vulnerability, and more.

Instructions

Search Shodan's database for hosts matching a query.

Uses Shodan's powerful search syntax to find internet-connected devices and services. Supports filters for port, country, organization, product, version, and more. Requires a paid Shodan API key.

IMPORTANT: Only query targets you are authorized to assess.

Returns: ShodanSearchResult with matching hosts and total result count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoResults page number (1-indexed). Each page returns up to 100 results.
queryYesShodan search query. Examples: "apache port:8080 country:US", "product:nginx", "ssl.cert.subject.CN:example.com", "vuln:CVE-2021-44228".
timeoutNoHTTP request timeout in seconds. Default: 30.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query that was executed
totalNoTotal number of matching results in Shodan
matchesNoMatching hosts from the search
Behavior4/5

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

With no annotations, the description carries the full transparency burden. It discloses the need for a paid API key, issues an authorization warning, and states the return type (ShodanSearchResult). It does not explicitly mention read-only status, rate limits, or error handling, but the search verb and context make read-only behavior evident. This is above-average for a search tool.

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 concise and well-structured: a clear first line, a brief elaboration on capabilities, a requirements note, and a returns summary. Every sentence contributes useful information without redundancy. The IMPORTANT authorization note is appropriately emphasized.

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

Completeness4/5

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

The combination of description, schema, and output schema covers the tool's operation well. It includes purpose, query syntax, auth requirements, and return type. Gaps include lack of explicit guidance on when to prefer sibling tools (e.g., shodan-search-count) and potential rate-limit behavior, but these are not critical given the schema and output schema.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds value by listing filter categories (port, country, organization, product, version, and more) that go beyond the schema's examples. This helps the agent construct more effective queries without needing to infer filters from examples.

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 opens with a specific verb and resource: 'Search Shodan's database for hosts matching a query.' This clearly distinguishes it from sibling tools like shodan-search-cves (CVE search) and shodan-search-count (count only). It also names supported filters, reinforcing the purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description establishes a clear use case: finding internet-connected devices and services with Shodan's search syntax. It provides context on filters and requires a paid API key. However, it does not explicitly mention when to use alternatives such as shodan-search-count or shodan-ip-lookup, which would strengthen the guidance.

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/Vorota-ai/shodan-mcp'

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