Skip to main content
Glama
cloudflare

mcp-server-cloudflare

Official
by cloudflare

migrate_pages_to_workers_guide

Learn how to migrate Cloudflare Pages projects to Workers with this step-by-step guide. Understand the process and requirements before starting your migration.

Instructions

ALWAYS read this guide before migrating Pages projects to Workers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'migrate_pages_to_workers_guide' tool, including its inline handler that fetches the migration guide text from Cloudflare Developers site.
    server.tool(
    	'migrate_pages_to_workers_guide',
    	`ALWAYS read this guide before migrating Pages projects to Workers.`,
    	{},
    	{
    		title: 'Get Pages migration guide',
    		annotations: {
    			readOnlyHint: true,
    		},
    	},
    	async () => {
    		const res = await fetch(
    			'https://developers.cloudflare.com/workers/prompts/pages-to-workers.txt',
    			{
    				cf: { cacheEverything: true, cacheTtl: 3600 },
    			}
    		)
    
    		if (!res.ok) {
    			return {
    				content: [{ type: 'text', text: 'Error: Failed to fetch guide. Please try again.' }],
    			}
    		}
    
    		return {
    			content: [
    				{
    					type: 'text',
    					text: await res.text(),
    				},
    			],
    		}
    	}
    )
  • Duplicate registration of the 'migrate_pages_to_workers_guide' tool with identical inline handler fetching the migration guide from Cloudflare Developers site.
    server.tool(
    	'migrate_pages_to_workers_guide',
    	`ALWAYS read this guide before migrating Pages projects to Workers.`,
    	{},
    	{
    		title: 'Get Pages migration guide',
    		annotations: {
    			readOnlyHint: true,
    		},
    	},
    	async () => {
    		const res = await fetch(
    			'https://developers.cloudflare.com/workers/prompts/pages-to-workers.txt',
    			{
    				cf: { cacheEverything: true, cacheTtl: 3600 },
    			}
    		)
    
    		if (!res.ok) {
    			return {
    				content: [{ type: 'text', text: 'Error: Failed to fetch guide. Please try again.' }],
    			}
    		}
    
    		return {
    			content: [
    				{
    					type: 'text',
    					text: await res.text(),
    				},
    			],
    		}
    	}
    )
Behavior3/5

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

Annotations provide a title ('Get Pages migration guide'), indicating this is likely a read-only informational tool. The description adds value by emphasizing the importance ('ALWAYS read') and specifying the context ('before migrating Pages projects to Workers'), which goes beyond the annotations. However, it doesn't detail behavioral traits like response format, potential errors, or interaction specifics, so it's adequate but not comprehensive.

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, direct sentence that efficiently conveys the tool's purpose and usage without any unnecessary words. It is front-loaded with the key instruction ('ALWAYS read this guide'), making it highly concise and well-structured for quick understanding.

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 simplicity (0 parameters, no output schema, annotations provide basic context), the description is complete enough for its purpose. It clearly states what the tool does and when to use it. However, it could benefit from mentioning what the guide contains or how it helps in migration, slightly limiting completeness for a guide tool.

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 tool has 0 parameters, and schema description coverage is 100%, meaning no parameters need documentation. The description doesn't discuss parameters, which is appropriate here. A baseline of 4 is applied for zero-parameter tools, as there's no need to compensate for missing param info.

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 purpose: to provide a guide that should be read before migrating Pages projects to Workers. It specifies the action ('read this guide') and the context ('before migrating Pages projects to Workers'), making it understandable. However, it doesn't explicitly differentiate from its sibling 'search_cloudflare_documentation', which could offer similar information, so it doesn't reach a score of 5.

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 explicitly states when to use this tool: 'ALWAYS read this guide before migrating Pages projects to Workers.' It provides clear timing ('before migrating') and a strong recommendation ('ALWAYS'), which effectively guides usage. There are no alternatives mentioned, but the directive is unambiguous for its intended context.

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

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