Skip to main content
Glama
jeffgolden

Cloudflare MCP Server

by jeffgolden

cloudflare-dns-mcp_get_zone_settings

Retrieve the complete settings object for a specified Cloudflare DNS zone using structured inputs to streamline configuration management and analysis.

Instructions

Get full settings object for a zone

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
zone_nameYes

Implementation Reference

  • The handler function for the 'cloudflare-dns-mcp/get_zone_settings' tool. It resolves the zone ID by name, fetches the settings from Cloudflare API, and returns them in MCP content format.
    handler: async (params: any) => {
      const { zone_name } = GetZoneSettingsInputSchema.parse(params);
      const zones = await client.get<any[]>('/zones', { name: zone_name });
      if (zones.length === 0) throw new Error(`Zone ${zone_name} not found`);
      const zoneId = zones[0].id;
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(await client.get(`/zones/${zoneId}/settings`), null, 2)
          }
        ]
      };
    },
  • Zod input schema for the get_zone_settings tool, requiring a zone_name string.
    const GetZoneSettingsInputSchema = z.object({
      zone_name: z.string(),
    });
  • Local registration of the get_zone_settings tool within the getZoneManagementTools function.
    return {
      tools: {
        'cloudflare-dns-mcp/list_zones': listZonesTool,
        'cloudflare-dns-mcp/get_zone_settings': getZoneSettingsTool,
        'cloudflare-dns-mcp/update_zone_settings': updateZoneSettingsTool,
        'cloudflare-dns-mcp/purge_cache': purgeCacheTool,
      },
    };
  • src/index.ts:48-52 (registration)
    Global tool registration where tool names are sanitized (slashes replaced with underscores, e.g., 'cloudflare-dns-mcp/get_zone_settings' becomes 'cloudflare-dns-mcp_get_zone_settings') and added to the toolsMap used by the MCP server.
    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;
    }
  • src/index.ts:25-31 (registration)
    Merging of zone management tools (including get_zone_settings) into the allTools object in the main server entry point.
    const allTools = {
      ...dnsTools.tools,
      ...securityTools.tools,
      ...sslCertTools.tools,
      ...echoTools.tools,
      ...redirectTools.tools,
      ...zoneTools.tools,
Behavior2/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 states it 'gets' settings, implying a read-only operation, but doesn't clarify authentication requirements, rate limits, error handling, or what 'full settings object' entails (e.g., format, nested structures). This leaves gaps for an agent to understand operational constraints.

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 core purpose without unnecessary words. Every part ('Get full settings object for a zone') contributes directly to understanding, making it appropriately sized and well-structured for quick comprehension.

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?

Given the tool's moderate complexity (read operation with one parameter) and lack of annotations or output schema, the description is incomplete. It doesn't explain the return value (what a 'full settings object' includes), error scenarios, or operational context like authentication needs. For a tool interacting with cloud infrastructure, more detail is warranted to ensure reliable use.

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?

The description adds minimal meaning beyond the input schema, which has 0% description coverage and defines one parameter 'zone_name'. It implies 'zone_name' identifies the zone to retrieve settings from, but doesn't specify format (e.g., domain name), validation, or examples. With low schema coverage, the description doesn't fully compensate, but the single parameter is straightforward, keeping it at baseline.

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 action ('Get') and resource ('full settings object for a zone'), making the purpose understandable. It distinguishes from siblings like 'list_zone_settings' by specifying retrieval of a complete settings object rather than listing. However, it doesn't explicitly differentiate from other read operations like 'list_dns_records' beyond the resource type.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid zone name), compare it to similar tools like 'list_zone_settings' or 'list_zones', or specify use cases (e.g., for configuration review). The description assumes context without explicit instructions.

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