Skip to main content
Glama

fofa_search

Read-onlyIdempotent

Execute exact FOFA queries to retrieve matching assets and control results with pagination, record limits, field selection, and optional cost inspection.

Instructions

Fetch one exact query. Omitting both caps returns one page of size; read total for the population.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "fofa_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
fullNo
sizeNo
queryYes
fieldsNo
max_pagesNo
max_recordsNo
observe_costNo

Output Schema

NameRequiredDescriptionDefault
pagesNo
queryYes
totalNo
usageNo
fieldsYes
recordsYes
summaryYes
consumedNo
page_sizeNo
max_recordsNo
next_cursorNo
duplicates_removedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv2.0.2
    • addedInput schema / properties / max_pages
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Max Pages"
      +}
    • addedInput schema / properties / max_records
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Max Records"
      +}
    • addedInput schema / properties / observe_cost
      Added value: +{
      +  "default": false,
      +  "title": "Observe Cost",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / duplicates_removed
      Added value: +{
      +  "default": 0,
      +  "title": "Duplicates Removed",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / max_records
      Added value: +{
      +  "default": 100,
      +  "title": "Max Records",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / page_size
      Added value: +{
      +  "default": 100,
      +  "title": "Page Size",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / pages
      Added value: +{
      +  "default": 1,
      +  "title": "Pages",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / usage
      Added value: +{
      +  "additionalProperties": true,
      +  "title": "Usage",
      +  "type": "object"
      +}
  2. First observedv2.0.1

TDQS

C2.3/5.0
Behavior3/5

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

Annotations already declare read-only, idempotent, open-world, non-destructive behavior, so the safety profile is covered. The description adds a genuinely useful behavioral fact: with no max_pages/max_records you get a single page of `size`, and `total` reports the full population. It omits cost/quota implications (relevant given the observe_cost parameter) and any note on rate limits or result ordering.

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

Conciseness3/5

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

Two short sentences with no filler and the default-behavior fact front-loaded, which is good. But the brevity crosses into under-specification rather than economy — the second clause is compressed to the point of ambiguity ("both caps", "size", "total").

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?

An output schema exists, so return values needn't be explained, and annotations cover safety. Still, for a 7-parameter, open-world, quota-consuming search tool with zero schema descriptions, the definition leaves too much — query syntax, field selection, cost observation, pagination strategy — for the agent to guess.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 7 parameters, so the description must carry the load and largely does not. It only obliquely explains that max_pages and max_records are "caps" and that omitting both yields one page; `query`, `full`, `fields`, `size`, and `observe_cost` get no meaning at all, leaving the most consequential parameters undocumented in both places.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

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

"Fetch one exact query" gestures at executing a query, but never names the resource (FOFA asset/host search) or what "exact" means. Nothing distinguishes it from siblings like fofa_search_next, fofa_icon_search, or fofa_export, so an agent cannot confidently pick it from the name-plus-description alone.

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?

The only guidance is the implicit default behavior when caps are omitted (one page of `size`). There is no statement of when to use this versus fofa_search_next for pagination, fofa_icon_search for icon lookups, or fofa_validate_query beforehand.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.