Skip to main content
Glama

cloudflare_search_api

Search Cloudflare API endpoints by running a JavaScript function against the resolved OpenAPI spec and return matching paths and summaries for a chosen account.

Instructions

Find Cloudflare API endpoints. code is a JavaScript async arrow function that searches spec.paths (the OpenAPI description, $refs resolved) and returns what it finds, e.g. the paths tagged "workers" with their summaries.

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": {
      "account": "<account>",
      "code": "<code>"
    },
    "name": "cloudflare_search_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesasync () => { ...search spec.paths... }
accountYesWhich connected account (alias) to act as, e.g. "business".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.2/5.0
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 behavioral burden. It does disclose two useful mechanics - that code is an async arrow function and that $refs are pre-resolved - but for a tool that executes arbitrary caller-supplied JavaScript it says nothing about sandboxing, side effects, iteration or size limits, or what the return value looks like.

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?

Two dense sentences with the resource first and the code contract second - no filler. The trailing example clause is somewhat convoluted and packs a lot into one sentence, but nothing is wasted.

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?

With no output schema and no annotations, the description must cover behavior itself, yet it leaves the return contract at 'returns what it finds' and never addresses the risk profile of executing arbitrary code. Adequate to start a call, but incomplete for a tool of this complexity.

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 coverage is 100% and both parameters are documented, so the baseline is 3. The description restates the code parameter in nearly the same words as the schema ('async () => { ...search spec.paths... }') and never mentions the account parameter or what a valid alias looks like, so it adds little meaning beyond the schema.

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 opens with a specific verb and resource ('Find Cloudflare API endpoints') and explains that the search runs over the resolved OpenAPI spec rather than free text. It does not distinguish itself from the sibling cloudflare_search_docs, so an agent must infer that this searches the API spec while that one searches prose documentation.

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?

Usage is only implied: the 'e.g. the paths tagged workers' example shows the intent of a spec lookup, but there is no statement of when to prefer this over cloudflare_search_docs or cloudflare_get, and no exclusions or preconditions are given.

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