|
1 | | -import type { RadarMCP } from './index' |
| 1 | +import type { RadarMCP, UserDetails } from './index' |
2 | 2 |
|
3 | 3 | export interface Env { |
4 | 4 | OAUTH_KV: KVNamespace |
5 | 5 | ENVIRONMENT: 'development' | 'staging' | 'production' |
6 | | - ACCOUNT_ID: '6702657b6aa048cf3081ff3ff3c9c52f' |
7 | 6 | MCP_SERVER_NAME: string |
8 | 7 | MCP_SERVER_VERSION: string |
9 | 8 | CLOUDFLARE_CLIENT_ID: string |
10 | 9 | CLOUDFLARE_CLIENT_SECRET: string |
11 | | - URL_SCANNER_API_TOKEN: string |
12 | 10 | MCP_OBJECT: DurableObjectNamespace<RadarMCP> |
| 11 | + USER_DETAILS: DurableObjectNamespace<UserDetails> |
13 | 12 | MCP_METRICS: AnalyticsEngineDataset |
14 | 13 | DEV_DISABLE_OAUTH: string |
15 | 14 | DEV_CLOUDFLARE_API_TOKEN: string |
16 | 15 | DEV_CLOUDFLARE_EMAIL: string |
17 | 16 | } |
| 17 | + |
| 18 | +export const BASE_INSTRUCTIONS = /* markdown */ ` |
| 19 | +# Cloudflare Radar MCP Server |
| 20 | +
|
| 21 | +This server integrates tools powered by the Cloudflare Radar API to provide insights into global Internet traffic, |
| 22 | +trends, and other related utilities. |
| 23 | +
|
| 24 | +An active account is **only required** for URL Scanner-related tools (e.g., \`scan_url\`). |
| 25 | +
|
| 26 | +For tools related to Internet trends and insights, analyze the results and, when appropriate, generate visualizations |
| 27 | +such as XY charts, pie charts, bar charts, or other relevant chart types. |
| 28 | +
|
| 29 | +### Making comparisons |
| 30 | +
|
| 31 | +Many tools support **array-based filters** to enable comparisons across multiple criteria. |
| 32 | +In such cases, the array index corresponds to a distinct data series. |
| 33 | +For each data series, provide a corresponding \`dateRange\`, or alternatively a \`dateStart\` and \`dateEnd\` pair. |
| 34 | +Example: To compare HTTP traffic between Portugal and Spain over the last 7 days: |
| 35 | +- \`dateRange: ["7d", "7d"]\` |
| 36 | +- \`location: ["PT", "ES"]\` |
| 37 | +
|
| 38 | +This applies to date filters and other filters that support comparison across multiple values. |
| 39 | +If a tool does **not** support array-based filters, you can achieve the same comparison by making multiple separate |
| 40 | +calls to the tool. |
| 41 | +` |
0 commit comments