Skip to main content
Glama

shodan-search-count

Count matching hosts for a Shodan query without using query credits, letting you check result volume before committing to a full search.

Instructions

Count how many hosts match a Shodan query WITHOUT consuming query credits.

Use this to check result volume before running a full search. Requires a Shodan API key but does NOT consume query credits.

Returns: SearchCountResult with total count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesShodan search query. Same syntax as shodan-search. Examples: "apache port:8080", "vuln:CVE-2021-44228 country:US".
timeoutNoHTTP request timeout in seconds. Default: 30.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query that was executed
totalYesTotal number of matching results
facetsNoFacet breakdown if facets were requested
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses the key behavioral trait (does NOT consume query credits), the requirement for an API key, and the return type. It does not mention rate limits or error conditions, but the most critical behavioral differentiator is clearly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded, with a clear structure: purpose, usage, requirement, and return value. However, 'does NOT consume query credits' is repeated twice, adding minor redundancy without contributing new information.

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

Completeness5/5

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

Given the low tool complexity, an output schema, and full parameter documentation, the description covers all essential context: what the tool does, when to use it, the API key requirement, the credit behavior, and the return type. It is complete enough for an agent to invoke it correctly.

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%, with both 'query' and 'timeout' well-described including syntax examples and defaults. The description adds no parameter-specific meaning beyond what the schema already provides, so the baseline of 3 is appropriate.

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: 'Count how many hosts match a Shodan query'. It clearly distinguishes itself from sibling tools like shodan-search by highlighting that it does NOT consume query credits, making the tool's purpose unmistakable.

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

Usage Guidelines5/5

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

Explicitly states when to use it: 'Use this to check result volume before running a full search.' This provides a direct use case and contrasts with the full-search alternative, giving the agent clear decision guidance. The schema further reinforces that the query syntax matches shodan-search.

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