Skip to main content
Glama
jeffgolden

Cloudflare MCP Server

by jeffgolden

cloudflare-dns-mcp_echo

Validate connectivity by sending a payload and receiving the same in response. Use this tool to test communication with Cloudflare MCP Server for DNS and security configurations.

Instructions

Simple connectivity check that returns the same payload sent by the client.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageNopong

Implementation Reference

  • The handler function for the 'cloudflare-dns-mcp/echo' tool. It parses the input message using Zod schema and returns it wrapped in the MCP content format with type 'text'.
    handler: async (params: unknown) => {
      const { message } = EchoInputSchema.parse(params);
      return {
        content: [
          {
            type: "text",
            text: message
          }
        ]
      };
    },
  • Zod input schema for the echo tool, defining an optional 'message' field defaulting to 'pong'.
    const EchoInputSchema = z.object({
      message: z.string().optional().default('pong'),
    });
  • JSON schema for the output of the echo tool, expecting an object with a 'content' array of text blocks.
    outputSchema: {
      type: 'object',
      properties: {
        content: {
          type: 'array',
          items: {
            type: 'object',
            properties: {
              type: { type: 'string' },
              text: { type: 'string' }
            }
          }
        }
      },
      required: ['content'],
      additionalProperties: false,
    },
  • src/tools/echo.ts:4-44 (registration)
    The getEchoTools function defines and exports the echo tool object, which is later imported and merged into the server's tools map.
    export function getEchoTools() {
      const EchoInputSchema = z.object({
        message: z.string().optional().default('pong'),
      });
    
      const echoTool = {
        name: 'cloudflare-dns-mcp/echo',
        description: 'Simple connectivity check that returns the same payload sent by the client.',
        inputSchema: zodToJsonSchema(EchoInputSchema),
        outputSchema: {
          type: 'object',
          properties: {
            content: {
              type: 'array',
              items: {
                type: 'object',
                properties: {
                  type: { type: 'string' },
                  text: { type: 'string' }
                }
              }
            }
          },
          required: ['content'],
          additionalProperties: false,
        },
        handler: async (params: unknown) => {
          const { message } = EchoInputSchema.parse(params);
          return {
            content: [
              {
                type: "text",
                text: message
              }
            ]
          };
        },
      };
    
      return { tools: { 'cloudflare-dns-mcp/echo': echoTool } };
    }
  • src/index.ts:22-32 (registration)
    In the main server file, getEchoTools is called and its tools are merged into the allTools object used for MCP server registration.
    const echoTools = getEchoTools();
    const redirectTools = getRedirectTools(cfClient);
    
    const allTools = {
      ...dnsTools.tools,
      ...securityTools.tools,
      ...sslCertTools.tools,
      ...echoTools.tools,
      ...redirectTools.tools,
      ...zoneTools.tools,
    } as Record<string, any>;
  • Helper code that sanitizes tool names by replacing non-alphanumeric characters (like '/') with '_', transforming 'cloudflare-dns-mcp/echo' to 'cloudflare-dns-mcp_echo' for the toolsMap used in MCP calls.
    const toolsMap: Record<string, any> = {};
    for (const tool of Object.values(allTools)) {
      const safeName = tool.name.replace(/[^a-zA-Z0-9_-]/g, '_');
      toolsMap[safeName] = tool;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It discloses the basic behavior (echoing payload) but lacks critical details: whether it requires authentication, rate limits, network dependencies, error responses, or side effects. For a connectivity tool with zero annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence that front-loads the purpose ('Simple connectivity check') and key behavior ('returns the same payload'). Every word earns its place with no redundancy or fluff.

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?

Given the tool's low complexity (1 optional parameter, no output schema, no annotations), the description is minimally complete for basic use but lacks depth. It doesn't cover error handling, authentication needs, or integration context with Cloudflare services, which could be important for a connectivity check in this environment.

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?

The input schema has 1 parameter with 0% description coverage, and the description adds meaningful context: it explains that the 'message' parameter is the 'payload sent by the client' and will be echoed back. This compensates well for the low schema coverage, though it doesn't detail the default value or constraints.

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 clearly states the tool's function as a 'connectivity check' that 'returns the same payload sent by the client,' which is specific and distinguishes it from siblings focused on DNS, security, cache, and zone operations. However, it doesn't explicitly name the resource (e.g., 'Cloudflare service') or differentiate from potential non-sibling echo tools.

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 description implies usage for connectivity testing but provides no explicit guidance on when to use this tool versus alternatives (e.g., other diagnostic tools or checking sibling tools like list_zones for availability). There's no mention of prerequisites, error conditions, or scenarios where it's preferred over other methods.

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

Related 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/jeffgolden/cloudflare_mcp'

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