Skip to main content
Glama

shodan_count

Count Shodan search results to scope queries before running full searches, helping conserve API credits by previewing result volumes and distributions.

Instructions

Get the total number of results for a search query without returning the actual results. Useful for scoping searches before running full queries to avoid wasting API credits.

Best Practice: Always use count first for large ICS/SCADA queries.

Example Workflow:

  1. Count: "port:502 tag:ics" → 50,000 results

  2. Narrow: "port:502 tag:ics country:US" → 15,000 results

  3. Refine: "port:502 tag:ics country:US org:"Electric"" → 500 results

  4. Then run full search on refined query

Use with facets to see distribution without burning credits on full results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesShodan search query. Same syntax as shodan_host_search. Examples: "port:502 tag:ics", "port:502 country:US", "tag:ics has_vuln:true"
facetsNoOptional facets for aggregated counts. Use to see distribution: "country,org,product". Shows breakdown without full results.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: it's a read-only operation (implied by 'get'), helps avoid wasting API credits (resource management), and works with facets for aggregated counts. However, it doesn't mention rate limits, authentication needs, or error handling, leaving some gaps for a tool with no annotation coverage.

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 appropriately sized and front-loaded with the core purpose in the first sentence. The example workflow and facet usage add value without being redundant. However, the 'Best Practice' section could be integrated more tightly, and some phrasing ('burning credits') is slightly informal, keeping it from a perfect score.

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?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is largely complete. It covers purpose, usage guidelines, and behavioral context like API credit conservation. The main gap is the lack of output details (what the count result looks like), but with no output schema, this is a minor omission in an otherwise thorough description.

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 thoroughly. The description adds some context by mentioning 'Use with facets to see distribution without burning credits on full results,' which reinforces the schema's facet description, but doesn't provide significant additional meaning beyond what's in the structured fields. 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.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get the total number of results for a search query') and resource ('search query'), distinguishing it from siblings like shodan_host_search by emphasizing it returns only counts, not actual results. The phrase 'without returning the actual results' explicitly differentiates its purpose from full search tools.

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?

The description provides explicit guidance on when to use this tool ('Useful for scoping searches before running full queries to avoid wasting API credits'), when not to use it (implied: when you need actual results, use shodan_host_search instead), and includes a detailed example workflow with alternatives. The 'Best Practice' section reinforces this with specific scenarios like large ICS/SCADA queries.

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/GangGreenTemperTatum/shodan-mcp-server'

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