diff --git a/.github/workflows/forge-tools.yml b/.github/workflows/forge-tools.yml new file mode 100644 index 00000000..0818da60 --- /dev/null +++ b/.github/workflows/forge-tools.yml @@ -0,0 +1,130 @@ +name: Forge tools + +# Every six hours, regenerates src/generated/forge-mcp, the direct tools served +# at /mcp?forge=true, from the latest openapi.forge.json Forge release with the +# forge commit that forge.json names. When the generated code changes, it opens +# or updates one pull request; merging it deploys through Workers Builds. +# +# The pull request is opened as the agent-think GitHub App (team-apps, in +# cloudflare/ai-agents) when its AGENT_THINK_APP_ID and AGENT_THINK_PRIVATE_KEY +# secrets are set, so CI runs on it as on any pull request. Without them it +# falls back to GITHUB_TOKEN, whose pull requests don't start other workflows; +# this job runs the type check and tests itself either way. + +on: + schedule: + - cron: '30 */6 * * *' + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +concurrency: + group: forge-tools + cancel-in-progress: false + +env: + BRANCH: bot/forge-tools + TITLE: 'chore(forge): regenerate the forge MCP tools' + HAS_APP: ${{ secrets.AGENT_THINK_APP_ID != '' }} + +jobs: + generate: + name: Generate + runs-on: ubuntu-latest + steps: + - name: Mint an agent-think token + id: app + if: env.HAS_APP == 'true' + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.AGENT_THINK_APP_ID }} + private-key: ${{ secrets.AGENT_THINK_PRIVATE_KEY }} + + - uses: actions/checkout@v6 + with: + token: ${{ steps.app.outputs.token || github.token }} + + - name: Read forge.json + id: forge + run: | + echo "repository=$(jq -r .repository forge.json)" >> "$GITHUB_OUTPUT" + echo "ref=$(jq -r .ref forge.json)" >> "$GITHUB_OUTPUT" + + - uses: actions/checkout@v6 + with: + repository: ${{ steps.forge.outputs.repository }} + ref: ${{ steps.forge.outputs.ref }} + path: .forge + + - uses: actions/cache@v5 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + .forge/target + key: forge-${{ runner.os }}-${{ steps.forge.outputs.ref }} + + # rustup reads .forge/rust-toolchain.toml and installs that toolchain. + - name: Build forge + working-directory: .forge + run: cargo build --release --bin forge + + - uses: actions/setup-node@v6 + with: + node-version: '22' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Generate + env: + FORGE_BINARY: .forge/target/release/forge + run: npm run generate:tools -- --summary "$RUNNER_TEMP/summary.md" + + - name: Check for changes + id: changes + run: | + if [ -n "$(git status --porcelain -- src/generated/forge-mcp)" ]; then + echo "changed=true" >> "$GITHUB_OUTPUT" + fi + + - name: Type check + if: steps.changes.outputs.changed == 'true' + run: npm run typecheck + + - name: Test + if: steps.changes.outputs.changed == 'true' + run: npm run test + + - name: Open or update the pull request + if: steps.changes.outputs.changed == 'true' + env: + GH_TOKEN: ${{ steps.app.outputs.token || github.token }} + APP_SLUG: ${{ steps.app.outputs.app-slug }} + FORGE_REF: ${{ steps.forge.outputs.ref }} + run: | + if [ -n "$APP_SLUG" ]; then + user_id=$(gh api "/users/${APP_SLUG}[bot]" --jq .id) + git config user.name "${APP_SLUG}[bot]" + git config user.email "${user_id}+${APP_SLUG}[bot]@users.noreply.github.com" + else + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + fi + git checkout -B "$BRANCH" + git add src/generated/forge-mcp + git commit -q -m "$TITLE" + git push -q --force origin "$BRANCH" + { + echo "Regenerated from the latest \`openapi.forge.json\` with forge \`${FORGE_REF:0:12}\`. Merging deploys the new tools to \`/mcp?forge=true\`." + echo + cat "$RUNNER_TEMP/summary.md" + } > "$RUNNER_TEMP/body.md" + if [ "$(gh pr view "$BRANCH" --json state --jq .state 2>/dev/null)" = OPEN ]; then + gh pr edit "$BRANCH" --body-file "$RUNNER_TEMP/body.md" + else + gh pr create --base main --head "$BRANCH" --title "$TITLE" --body-file "$RUNNER_TEMP/body.md" + fi diff --git a/.oxfmtrc.json b/.oxfmtrc.json index 08068dd7..19a7ede2 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -2,5 +2,8 @@ "$schema": "./node_modules/oxfmt/configuration_schema.json", "singleQuote": true, "semi": false, - "trailingComma": "none" + "trailingComma": "none", + "ignorePatterns": [ + "src/generated/**" + ] } diff --git a/AGENTS.md b/AGENTS.md index db8d6660..5a0bdad7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,6 +36,8 @@ cloudflare-mcp/ │ ├── api-refusal-hint.ts # Looks up a refused execute request's permissions in mcp-tools.json │ ├── scope-challenge.ts # Per-request insufficient_scope step-up challenge │ ├── clients.ts # Known MCP clients that deviate from the spec, and their behavior +│ ├── generated/forge-mcp/ # Direct tools generated by forge (?forge=true); never edit by hand +│ ├── forge-tools/ # Forge tools service (worker.ts), call planning, Cloudflare policy │ ├── auth/ │ │ ├── types.ts # Auth props schemas (Zod discriminated union) │ │ ├── api-token-mode.ts # Prefix classification & external resolver @@ -54,11 +56,15 @@ cloudflare-mcp/ │ ├── worker.test.ts # Real worker end to end via exports.default.fetch │ └── *.test.ts ├── scripts/ -│ └── seed-r2.ts # Seed OpenAPI spec to R2 bucket +│ ├── seed-r2.ts # Seed OpenAPI spec to R2 bucket +│ └── generate-tools.ts # Regenerate src/generated/forge-mcp with forge +├── forge.json # The forge commit that generates src/generated/forge-mcp ├── .github/workflows/ │ ├── ci.yml # PR validation +│ ├── forge-tools.yml # Six-hourly regeneration PR for src/generated/forge-mcp │ └── bonk.yml # AI code review ├── wrangler.jsonc # Workers config (dev/staging/prod) +├── wrangler.forge-tools.jsonc # Forge tools service config (dev/staging/prod) ├── .oxfmtrc.json # oxfmt formatter config └── README.md ``` @@ -78,6 +84,8 @@ Node 22+ required. | `npm run dev` | Start local dev server (wrangler dev) | | `npm run deploy` | Deploy to staging | | `npm run deploy:prod` | Deploy to production | +| `npm run deploy:forge-tools` / `deploy:forge-tools:prod` | Deploy the forge tools service to staging / production | +| `npm run generate:tools` | Regenerate `src/generated/forge-mcp` (needs `FORGE_BINARY`) | | `npm run types` | Generate worker type definitions | | `npm run typecheck` | TypeScript type checking (no emit) | | `npm run lint` | Lint with oxlint | @@ -162,6 +170,18 @@ The consent page offers minimal, read-only and full-access templates. Minimal is - `mcp-tools.json` holds the final wire JSON Schemas (including the session-independent optional `account_id`) plus minimal request-routing metadata. Each isolate builds the `tools/list` payload from it once and serves it unchanged; `tools/call` lazily validates/dispatches only the requested operation with Zod. No per-endpoint SDK tools are registered - `src/isolate-cache.ts` caches all three artifacts for one hour in warm isolates. Concurrent requests on a cold isolate share one load, and a failed load is not cached. There is no fallback: a missing `mcp-tools.json` fails the request, so seed R2 (`npm run seed:staging` / `seed:prod`) before deploying a change to its key or shape +### Forge-generated direct tools (`?forge=true`, opt-in) + +A second direct-tool surface whose code is generated by forge rather than built from the spec at runtime, while it is tried out: + +- `src/generated/forge-mcp/` is TypeScript that `forge openapi.forge.json --target mcp` writes, committed and never edited by hand. Each group's `tools.ts` has its tools: schema, hints, the method's extensions, and a `request(args)` function that builds the API request. `schemas.ts` files hold the shared model schemas, `index.ts` exports every tool, `README.md` lists the methods without a tool and why, and `_/` is forge's runtime for serving them on an `McpServer`. oxfmt and oxlint skip it +- The MCP target lives on the long-lived `forge-mcp` branch of a forge fork; `forge.json` pins the commit. `FORGE_BINARY=… npm run generate:tools` regenerates locally. `.github/workflows/forge-tools.yml` builds that forge, regenerates from the latest `openapi.forge.json` every six hours, runs the type check and tests, and opens or updates the `bot/forge-tools` pull request when the code changes, as the agent-think GitHub App when its `AGENT_THINK_APP_ID` / `AGENT_THINK_PRIVATE_KEY` secrets are set (otherwise `GITHUB_TOKEN`, whose pull requests don't start CI). Merging it deploys. To change the generator, bump `forge.json`'s `ref` +- The generated tools run in their own Worker, the **forge tools service** (`src/forge-tools/worker.ts`, `wrangler.forge-tools.jsonc`, `cloudflare-api-mcp-forge-tools[-staging|-dev]`), which the main Worker reaches through its `FORGE_TOOLS` service binding. Code Mode isolates never compile the ~10 MB of generated code: workerd compiles every module a Worker uploads at startup, so in the main Worker a lazy import still cost ~27 ms per isolate, and a separate uploaded module didn't help. The service holds no credentials, makes no requests, and has no route. Its RPC methods are `list()`, the tools as `tools/list` sends them, and `plan(name, args, { baseUrl, sessionAccountId })`, the request a call makes (`src/forge-tools/plan.ts`) +- `src/forge-tools/cloudflare.ts` applies the Cloudflare policy once per service isolate: `account_id` is optional with one description, and merged `account_or_zone` tools name their two values. Permissions come from each tool's `x-api-token-group` extension, which clients never see +- `src/tools/forge-tools.ts`, in the main Worker, serves `?forge=true`: `docs` and `whoami` itself, and the generated tools from the service. It sends each planned request with the session's token, which never leaves the main Worker, and explains refused calls and steps up OAuth scopes like the other direct tools +- Deploy the service before the main Worker in each environment (`npm run deploy:forge-tools` / `deploy:forge-tools:prod`), since the main Worker binds to it. `npm run dev` runs both, and `npm run types` reads both configs to type the binding. Vitest builds the service with `wrangler deploy --dry-run` and runs it as an auxiliary Worker, so tests call it over the real binding +- Tool names are forge's (`d1_list`, `zones_list`), not `src/openapi.ts`'s, so `?forge=true` is a separate opt-in; `?codemode=false` is unchanged + ### Skills over MCP The server implements the MCP Skills extension (`io.modelcontextprotocol/skills`, [SEP-2640](https://github.com/modelcontextprotocol/ext-skills/blob/main/specification/stable/skills.mdx)) in both tool modes and serves the skills from [`cloudflare/skills`](https://github.com/cloudflare/skills). diff --git a/README.md b/README.md index 26099f31..469398bf 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,14 @@ https://mcp.cloudflare.com/mcp?codemode=false&truncateToolResult=false > **Note:** Without the cap, a broad query can return megabytes. Only turn it off when your client bounds what reaches the model. +### Forge-generated tools (preview) + +`?forge=true` serves direct tools whose code [forge](https://github.com/cloudflare/forge) generates from the Cloudflare API's OpenAPI document instead. Tool names follow the `cf` CLI (`zones_list`, `d1_list`), and request bodies are typed, nested JSON. It is a preview: names and schemas may change. + +``` +https://mcp.cloudflare.com/mcp?forge=true +``` + ### Missing Permissions When Cloudflare refuses a call because the OAuth connection lacks a scope, the server asks the client to re-authorize with that scope added to the ones it already has. Claude and other clients that follow the [MCP authorization spec](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization#scope-challenge-handling) get a `403 insufficient_scope` challenge. Codex and ChatGPT get it in the tool result, which is where they look for it. Either way, the tool error says which scope is missing. diff --git a/forge.json b/forge.json new file mode 100644 index 00000000..79be792b --- /dev/null +++ b/forge.json @@ -0,0 +1,5 @@ +{ + "$comment": "The forge that generates src/generated/forge-mcp: a commit of the forge-mcp branch. Bump ref to pick up generator changes; CI builds it.", + "repository": "mattzcarey/forge", + "ref": "3f7e168c5e8fe33c71802833fa7a54a795376bae" +} diff --git a/package.json b/package.json index 6ec72041..d1fc3553 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,16 @@ "description": "MCP server for the entire Cloudflare API using codemode", "type": "module", "scripts": { - "dev": "wrangler dev", + "dev": "wrangler dev -c wrangler.jsonc -c wrangler.forge-tools.jsonc", "deploy": "wrangler deploy --env staging", + "deploy:forge-tools": "wrangler deploy -c wrangler.forge-tools.jsonc --env staging", + "deploy:forge-tools:prod": "wrangler deploy -c wrangler.forge-tools.jsonc --env production", "deploy:prod": "wrangler deploy --env production", - "types": "wrangler types --env-file .env_example", + "types": "wrangler types --env-file .env_example -c wrangler.jsonc -c wrangler.forge-tools.jsonc", "typecheck": "tsc --noEmit", - "lint": "oxlint src/", + "lint": "oxlint src/ --ignore-pattern 'src/generated/**'", "format": "oxfmt --write src/ tests/ scripts/ vitest.config.ts", + "generate:tools": "tsx scripts/generate-tools.ts", "format:check": "oxfmt --check src/ tests/ scripts/ vitest.config.ts", "test": "vitest run", "test:events": "vitest run tests/events-e2e.test.ts tests/ans-bridge.test.ts", diff --git a/scripts/generate-tools.ts b/scripts/generate-tools.ts new file mode 100644 index 00000000..9a9a88d6 --- /dev/null +++ b/scripts/generate-tools.ts @@ -0,0 +1,84 @@ +/** + * Regenerates `src/generated/forge-mcp`, the direct tools served at + * `/mcp?forge=true`, with forge's MCP target: + * + * FORGE_BINARY=path/to/forge npm run generate:tools [-- --spec openapi.forge.json] [-- --summary summary.md] + * + * `forge.json` names the forge commit to build; `.github/workflows/forge-tools.yml` + * builds it, runs this every six hours, and opens a pull request when the + * generated code changes. Without `--spec`, the latest `openapi.forge.json` + * Forge release is downloaded. `--summary` writes the tools added and removed + * as Markdown, for the pull request. + */ +import { execFileSync } from 'node:child_process' +import { + existsSync, + mkdtempSync, + readFileSync, + readdirSync, + renameSync, + rmSync, + writeFileSync +} from 'node:fs' +import { tmpdir } from 'node:os' +import { join } from 'node:path' +import { parseArgs } from 'node:util' + +const SPEC_URL = 'https://github.com/cloudflare/forge/releases/latest/download/openapi.forge.json' +const OUT = 'src/generated/forge-mcp' + +const { values } = parseArgs({ options: { spec: { type: 'string' }, summary: { type: 'string' } } }) +const forge = process.env.FORGE_BINARY ?? 'forge' +const tmp = mkdtempSync(join(tmpdir(), 'forge-mcp-')) + +try { + let spec = values.spec + if (!spec) { + console.log(`Downloading ${SPEC_URL}`) + const response = await fetch(SPEC_URL) + if (!response.ok) throw new Error(`Failed to download the spec: HTTP ${response.status}`) + spec = join(tmp, 'openapi.forge.json') + writeFileSync(spec, Buffer.from(await response.arrayBuffer())) + } + + const out = join(tmp, 'out') + execFileSync(forge, [spec, '--target', 'mcp', '--out', out], { stdio: 'inherit' }) + + const before = toolNames(OUT) + rmSync(OUT, { recursive: true, force: true }) + renameSync(out, OUT) + const after = toolNames(OUT) + + const added = [...after].filter((name) => !before.has(name)).sort() + const removed = [...before].filter((name) => !after.has(name)).sort() + console.log(`${after.size} tools: ${added.length} added, ${removed.length} removed`) + if (values.summary) writeFileSync(values.summary, summary(after.size, added, removed)) +} finally { + rmSync(tmp, { recursive: true, force: true }) +} + +/** The names of the generated tools in `dir`, read from each `tools.ts`. */ +function toolNames(dir: string): Set { + const names = new Set() + if (!existsSync(dir)) return names + for (const entry of readdirSync(dir, { recursive: true, withFileTypes: true })) { + if (entry.isFile() && entry.name === 'tools.ts') { + const source = readFileSync(join(entry.parentPath, entry.name), 'utf8') + for (const match of source.matchAll(/^ {4}name: "([^"]+)",$/gm)) names.add(match[1]!) + } + } + return names +} + +function summary(count: number, added: string[], removed: string[]): string { + const list = (names: string[]) => names.map((name) => `- \`${name}\``).join('\n') + return [ + `${count} tools: ${added.length} added, ${removed.length} removed.`, + removed.length > 0 + ? `\n**Removed** (clients calling these will get "not found"):\n\n${list(removed)}` + : '', + added.length > 0 ? `\n
Added\n\n${list(added)}\n\n
` : '' + ] + .filter(Boolean) + .join('\n') +} diff --git a/src/forge-tools/cloudflare.ts b/src/forge-tools/cloudflare.ts new file mode 100644 index 00000000..ad0acc02 --- /dev/null +++ b/src/forge-tools/cloudflare.ts @@ -0,0 +1,62 @@ +import type { InputSchema, JsonSchema, Tool } from '../generated/forge-mcp' +import { + ACCOUNT_OR_ZONE_DESCRIPTION, + ACCOUNT_OR_ZONE_ID_DESCRIPTION, + ACCOUNT_OR_ZONE_VALUES, + FORGE_ACCOUNT_ID_DESCRIPTION, + PERMISSIONS_EXTENSION +} from './policy' + +/** + * The Cloudflare policy on top of a generated tool: + * + * - `account_id` is optional with one description, so tool lists don't depend + * on the session; the server fills it in when the session has one account. + * - Forge merges methods that exist under both accounts and zones into + * `/{account_or_zone}/{account_or_zone_id}/…`. `account_or_zone` gets its + * two values, and `account_or_zone_id` is optional like `account_id`. The + * document doesn't describe them yet (cloudflare/forge#59); once it does, + * the generator can carry them and this can go. + * + * The tool's request code is kept, so calls build the same requests. + */ +export function cloudflareTool(tool: Tool): Tool { + const properties = tool.inputSchema.properties + if (!properties || !('account_id' in properties || 'account_or_zone' in properties)) return tool + + const changed: Record = { ...properties } + const optional = new Set() + if ('account_id' in changed) { + changed.account_id = { type: 'string', description: FORGE_ACCOUNT_ID_DESCRIPTION } + optional.add('account_id') + } + if ('account_or_zone' in changed) { + changed.account_or_zone = { + type: 'string', + enum: [...ACCOUNT_OR_ZONE_VALUES], + description: ACCOUNT_OR_ZONE_DESCRIPTION + } + } + if ('account_or_zone_id' in changed) { + changed.account_or_zone_id = { type: 'string', description: ACCOUNT_OR_ZONE_ID_DESCRIPTION } + optional.add('account_or_zone_id') + } + const required = (tool.inputSchema.required ?? []).filter((key) => !optional.has(key)) + const { required: _required, ...schema } = tool.inputSchema + const inputSchema: InputSchema = { + ...schema, + properties: changed, + ...(required.length > 0 && { required }) + } + return { ...tool, inputSchema } +} + +/** The API token permissions `tool` accepts, if its method lists them. */ +export function permissionsOf(tool: Tool): string[] | undefined { + const value = tool.extensions?.[PERMISSIONS_EXTENSION] + return Array.isArray(value) && + value.length > 0 && + value.every((item) => typeof item === 'string' && item.length > 0) + ? value + : undefined +} diff --git a/src/forge-tools/plan.ts b/src/forge-tools/plan.ts new file mode 100644 index 00000000..bf1c14ae --- /dev/null +++ b/src/forge-tools/plan.ts @@ -0,0 +1,102 @@ +import type { Args, Tool } from '../generated/forge-mcp' +import { permissionsOf } from './cloudflare' + +const ACCOUNT_OR_ZONE_PREFIX = '/{account_or_zone}/{account_or_zone_id}' + +/** What the main Worker passes with each call: nothing secret. */ +export interface PlanOptions { + /** The Cloudflare API base URL, such as `https://api.cloudflare.com/client/v4`. */ + readonly baseUrl: string + /** The session's account when it has exactly one, to fill in an omitted account. */ + readonly sessionAccountId?: string +} + +/** + * What calling a generated tool takes. The tools service plans the call; the + * main Worker adds the session's token, sends the request, and explains a + * refusal. The plan carries no credentials. + */ +export type CallPlan = + | { readonly kind: 'unknown' } + | { readonly kind: 'invalid'; readonly message: string } + /** The tool takes an account, the caller left it out, and the session has more than one. */ + | { readonly kind: 'needs_account' } + | { + readonly kind: 'request' + readonly method: string + readonly url: string + readonly headers: Readonly> + readonly body?: string + /** The path template, with a merged account-or-zone path made concrete, for scope lookups. */ + readonly template: string + /** The API token permissions the method accepts. */ + readonly permissions?: readonly string[] + /** The account the request names, if any, for explaining a refusal. */ + readonly accountId?: string + } + +/** + * Plans calling `tool` with `given`: fills in the session's account where the + * tool takes one and the caller left it out, then builds the request with the + * tool's generated code. + */ +export async function planCall( + tool: Tool, + given: Args, + options: PlanOptions, + build: (tool: Tool, args: Args, baseUrl: string) => Request, + isInvalidArguments: (error: unknown) => boolean +): Promise { + const key = accountKey(tool, given) + let args = given + if (key && given[key] === undefined) { + if (!options.sessionAccountId) return { kind: 'needs_account' } + args = { ...given, [key]: options.sessionAccountId } + } + + let request: Request + try { + request = build(tool, args, options.baseUrl) + } catch (error) { + if (isInvalidArguments(error)) return { kind: 'invalid', message: (error as Error).message } + throw error + } + const body = request.body ? await request.text() : undefined + const permissions = permissionsOf(tool) + const accountId = accountIdOf(args) + return { + kind: 'request', + method: request.method, + url: request.url, + headers: Object.fromEntries(request.headers), + ...(body !== undefined && { body }), + template: template(tool, args), + ...(permissions && { permissions }), + ...(accountId && { accountId }) + } +} + +/** The argument that names the account, when the tool takes one for these arguments. */ +function accountKey(tool: Tool, args: Args): string | undefined { + if (tool.path.includes('{account_id}')) return 'account_id' + if (tool.path.startsWith(ACCOUNT_OR_ZONE_PREFIX) && args.account_or_zone === 'accounts') { + return 'account_or_zone_id' + } + return undefined +} + +function accountIdOf(args: Args): string | undefined { + const id = args.account_or_zone === 'accounts' ? args.account_or_zone_id : args.account_id + return typeof id === 'string' ? id : undefined +} + +/** + * The endpoint's path template, with a merged account-or-zone path made + * concrete, since scope lookups tell account requests from zone ones by the + * first segment (cloudflare/forge#59). + */ +function template(tool: Tool, args: Args): string { + if (!tool.path.startsWith(ACCOUNT_OR_ZONE_PREFIX)) return tool.path + const scope = args.account_or_zone === 'zones' ? '/zones/{zone_id}' : '/accounts/{account_id}' + return scope + tool.path.slice(ACCOUNT_OR_ZONE_PREFIX.length) +} diff --git a/src/forge-tools/policy.ts b/src/forge-tools/policy.ts new file mode 100644 index 00000000..c4bd38cc --- /dev/null +++ b/src/forge-tools/policy.ts @@ -0,0 +1,25 @@ +/** The Cloudflare policy for the tools forge generates (`src/generated/forge-mcp`). */ + +/** The generated tool that lists the caller's accounts. */ +export const ACCOUNTS_TOOL = 'accounts_list' + +/** Points callers at the generated account listing tool. */ +export const FORGE_ACCOUNT_DISCOVERY_GUIDANCE = `Call the ${ACCOUNTS_TOOL} tool to discover available accounts.` + +/** + * The `account_id` schema on every account-scoped tool: optional, with the same + * description for every session, because clients cache tool lists and may + * share them. The server fills it in when the session has one account. + */ +export const FORGE_ACCOUNT_ID_DESCRIPTION = `Cloudflare account ID. Optional when the session is authorized for exactly one account; otherwise required. ${FORGE_ACCOUNT_DISCOVERY_GUIDANCE}` + +/** The values of the `account_or_zone` path parameter Forge adds to methods it merged. */ +export const ACCOUNT_OR_ZONE_VALUES = ['accounts', 'zones'] as const + +export const ACCOUNT_OR_ZONE_DESCRIPTION = + 'Whether account_or_zone_id is an account ID (`accounts`) or a zone ID (`zones`).' + +export const ACCOUNT_OR_ZONE_ID_DESCRIPTION = `The account or zone ID that account_or_zone names. Optional for \`accounts\` when the session is authorized for exactly one account. ${FORGE_ACCOUNT_DISCOVERY_GUIDANCE}` + +/** The extension a tool's accepted API token permissions are kept under. */ +export const PERMISSIONS_EXTENSION = 'x-api-token-group' diff --git a/src/forge-tools/worker.ts b/src/forge-tools/worker.ts new file mode 100644 index 00000000..b4e40db0 --- /dev/null +++ b/src/forge-tools/worker.ts @@ -0,0 +1,45 @@ +/** + * The forge tools service: the Worker that holds the generated direct tools + * (`src/generated/forge-mcp`) and serves them to the main Worker over RPC, so + * isolates serving Code Mode never compile them. + * + * It holds no credentials and makes no requests. `list` returns the tools as + * `tools/list` sends them; `plan` builds the request a call makes, which the + * main Worker sends with the session's token. It has no public route: the + * main Worker reaches it through its `FORGE_TOOLS` service binding. + */ +import { WorkerEntrypoint } from 'cloudflare:workers' +import { + buildRequest, + InvalidArguments, + listTools, + tools as generatedTools, + toolsByName, + type Args +} from '../generated/forge-mcp' +import { cloudflareTool } from './cloudflare' +import { planCall, type CallPlan, type PlanOptions } from './plan' + +/** The generated tools with the Cloudflare policy, built once per isolate. */ +const tools = generatedTools.map(cloudflareTool) + +export default class ForgeTools extends WorkerEntrypoint { + /** + * The generated tools, as `tools/list` sends them. Typed as plain objects: + * the SDK's `Tool` type is too deep for the RPC stub types. + */ + list(): Record[] { + return listTools(tools) as unknown as Record[] + } + + /** The request calling the tool `name` with `args` makes, or why it can't be made. */ + plan(name: string, args: Args, options: PlanOptions): Promise { + const tool = toolsByName(tools).get(name) + if (!tool) return Promise.resolve({ kind: 'unknown' }) + return planCall(tool, args, options, buildRequest, (error) => error instanceof InvalidArguments) + } + + override fetch(): Response { + return new Response('Not found', { status: 404 }) + } +} diff --git a/src/generated/forge-mcp/README.md b/src/generated/forge-mcp/README.md new file mode 100644 index 00000000..fffa725e --- /dev/null +++ b/src/generated/forge-mcp/README.md @@ -0,0 +1,37 @@ + + +# MCP tools + +3053 tools in 1074 groups. `index.ts` exports them as `tools`, with the runtime in `_/tool.ts` that builds their requests; `_/server.ts` serves them on an `McpServer`. + +## Methods without a tool + +| Method | Path | Why | +| --- | --- | --- | +| `POST` | `/accounts/{account_id}/addressing/loa_documents` | the request body is not JSON (multipart/form-data) | +| `POST` | `/accounts/{account_id}/analytics_engine/sql` | the request body is not JSON (text/plain) | +| `POST` | `/accounts/{account_id}/cloudforce-one/binary` | the request body is not JSON (multipart/form-data) | +| `POST` | `/zones/{zone_id}/dns_records/import` | the request body is not JSON (multipart/form-data) | +| `POST` | `/accounts/{account_id}/images/v1` | the request body is not JSON (multipart/form-data) | +| `POST` | `/accounts/{account_id}/images/v2/direct_upload` | the request body is not JSON (multipart/form-data) | +| `PUT` | `/accounts/{account_id}/intel/indicator-feeds/{feed_id}/snapshot` | the request body is not JSON (multipart/form-data) | +| `PUT` | `/accounts/{account_id}/storage/kv/namespaces/{namespace_id}/values/{key_name}` | the request body is not JSON (application/octet-stream, multipart/form-data) | +| `POST` | `/accounts/{account_id}/brand-protection/logos` | the request body is not JSON (application/x-www-form-urlencoded) | +| `POST` | `/{account_or_zone}/{account_or_zone_id}/logs/explorer/query/sql` | the request body is not JSON (text/plain) | +| `POST` | `/accounts/{account_id}/pages/projects/{project_name}/deployments` | the request body is not JSON (multipart/form-data) | +| `POST` | `/accounts/{account_id}/pay-per-use/usage-reports` | the request body is not JSON (application/jsonl) | +| `PUT` | `/accounts/{account_id}/r2/buckets/{bucket_name}/objects/{object_key}` | the request body is not JSON (application/octet-stream) | +| `PUT` | `/zones/{zone_id}/snippets/{snippet_name}` | the request body is not JSON (multipart/form-data) | +| `PUT` | `/accounts/{account_id}/stream/{identifier}/captions/{language}` | the request body is not JSON (multipart/form-data) | +| `POST` | `/accounts/{account_id}/vectorize/v2/indexes/{index_name}/insert` | the request body is not JSON (application/x-ndjson) | +| `POST` | `/accounts/{account_id}/vectorize/v2/indexes/{index_name}/upsert` | the request body is not JSON (application/x-ndjson) | +| `POST` | `/accounts/{account_id}/workers/assets/upload` | the request body is not JSON (multipart/form-data) | +| `PUT` | `/accounts/{account_id}/workers/scripts/{script_name}` | the request body is not JSON (application/javascript, multipart/form-data, text/javascript) | +| `PUT` | `/accounts/{account_id}/workers/scripts/{script_name}/content` | the request body is not JSON (multipart/form-data) | +| `PATCH` | `/accounts/{account_id}/workers/scripts/{script_name}/settings` | the request body is not JSON (multipart/form-data) | +| `POST` | `/accounts/{account_id}/workers/scripts/{script_name}/versions` | the request body is not JSON (multipart/form-data) | +| `PUT` | `/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}` | the request body is not JSON (application/javascript, multipart/form-data, text/javascript) | +| `PUT` | `/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content` | the request body is not JSON (multipart/form-data) | +| `PATCH` | `/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/settings` | the request body is not JSON (multipart/form-data) | +| `POST` | `/accounts/{account_id}/dlp/datasets/{dataset_id}/upload/{version}` | the request body is not JSON (application/octet-stream) | +| `PUT` | `/accounts/{account_id}/dlp/document_fingerprints/{document_fingerprint_id}` | the request body is not JSON (multipart/form-data) | diff --git a/src/generated/forge-mcp/_/index.ts b/src/generated/forge-mcp/_/index.ts new file mode 100644 index 00000000..2c39f0a4 --- /dev/null +++ b/src/generated/forge-mcp/_/index.ts @@ -0,0 +1,19 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +export { + buildRequest, + InvalidArguments, + listTools, + pathParam, + toolsByName, + type ApiRequest, + type Args, + type HeaderParam, + type InputSchema, + type JsonSchema, + type QueryParam, + type Tool, + type ToolAnnotations, +} from './tool.js'; +export { callTool, createHandler, readBody, serveTools, type CallContext, type HandlerOptions } from './server.js'; diff --git a/src/generated/forge-mcp/_/server.ts b/src/generated/forge-mcp/_/server.ts new file mode 100644 index 00000000..e0edd791 --- /dev/null +++ b/src/generated/forge-mcp/_/server.ts @@ -0,0 +1,156 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { + createMcpHandler, + McpServer, + type CallToolResult, + type Implementation, + type Tool as McpTool, +} from '@modelcontextprotocol/server'; + +import { buildRequest, InvalidArguments, listTools, toolsByName, type Args, type Tool } from './tool.js'; + +/** What a tool call needs besides the tool and its arguments. */ +export interface CallContext { + /** The API's base URL. */ + readonly baseUrl: string; + /** Headers every API request sends, such as `Authorization`. */ + readonly headers?: HeadersInit; + readonly fetch?: (request: Request) => Promise; + /** + * Returns the text of the result. By default a JSON body is pretty-printed, + * text is kept, and an error starts with the status. + */ + readonly formatResult?: (body: unknown, response: Response) => string; +} + +/** + * Serves `tools` on `server` with low-level `tools/list` and `tools/call` + * handlers, rather than registering each tool, which for thousands of tools + * costs more than the request. `call` makes the API request, and `extra` + * tools the server serves itself are listed first. + */ +export function serveTools( + server: McpServer, + tools: readonly Tool[], + call: (tool: Tool, args: Args) => Promise, + extra: readonly McpTool[] = [], +): void { + const listing = extra.length > 0 ? [...extra, ...listTools(tools)] : listTools(tools); + const byName = toolsByName(tools); + server.server.registerCapabilities({ tools: { listChanged: false } }); + // The SDK types the list as mutable; it only serializes it. + server.server.setRequestHandler('tools/list', () => ({ tools: listing as McpTool[] })); + server.server.setRequestHandler('tools/call', async (request) => { + const tool = byName.get(request.params.name); + if (!tool) { + return errorResult(`Unknown tool: ${request.params.name}`); + } + return call(tool, request.params.arguments ?? {}); + }); +} + +/** + * Calls `tool`: builds its request, sends it, and returns the response as the + * result. A response that isn't 2xx is a result with `isError: true` rather + * than a protocol error, so the model sees what the API said. + */ +export async function callTool(tool: Tool, args: Args, context: CallContext): Promise { + let request: Request; + try { + request = buildRequest(tool, args, context.baseUrl); + } catch (err) { + if (err instanceof InvalidArguments) { + return errorResult(err.message); + } + throw err; + } + for (const [name, value] of new Headers(context.headers)) { + request.headers.set(name, value); + } + const response = await (context.fetch ?? fetch)(request); + const body = await readBody(response); + const text = (context.formatResult ?? defaultFormat)(body, response); + return response.ok ? { content: [{ type: 'text', text }] } : errorResult(text); +} + +/** + * Returns the body of `response`: parsed JSON, text, or for anything else a + * sentence saying what it was, since a tool result can't carry the bytes. + */ +export async function readBody(response: Response): Promise { + const type = response.headers.get('Content-Type') ?? ''; + if (/json/i.test(type)) { + const text = await response.text(); + try { + return text ? JSON.parse(text) : text; + } catch { + return text; + } + } + if (type === '' || /^text\/|xml|javascript|yaml|csv/i.test(type)) { + return response.text(); + } + const size = (await response.arrayBuffer()).byteLength; + return `The response is ${size} bytes of ${type}, which this tool can't show.`; +} + +function defaultFormat(body: unknown, response: Response): string { + const text = typeof body === 'string' ? body : JSON.stringify(body, null, 2); + return response.ok ? text : `${response.status} ${response.statusText}\n${text}`.trim(); +} + +function errorResult(text: string): CallToolResult { + return { content: [{ type: 'text', text }], isError: true }; +} + +/** What {@link createHandler} serves. */ +export interface HandlerOptions { + readonly tools: readonly Tool[]; + /** The API's base URL. */ + readonly baseUrl: string; + readonly serverInfo: Implementation; + readonly instructions?: string; + /** + * Called before each MCP request is served. Returns the headers its API + * requests send, such as the caller's `Authorization`, or a response that + * refuses it. + */ + readonly authorize?: ( + request: Request, + ) => HeadersInit | Response | undefined | Promise; + readonly fetch?: (request: Request) => Promise; + readonly formatResult?: CallContext['formatResult']; +} + +/** + * Returns a `fetch` that serves `tools` over MCP's Streamable HTTP transport: + * for a Worker, or any server with web-standard requests. Each request gets a + * fresh, stateless server. + */ +export function createHandler(options: HandlerOptions): { fetch(request: Request): Promise } { + return { + async fetch(request) { + const authorized = options.authorize ? await options.authorize(request) : undefined; + if (authorized instanceof Response) { + return authorized; + } + const context: CallContext = { + baseUrl: options.baseUrl, + ...(authorized && { headers: authorized }), + ...(options.fetch && { fetch: options.fetch }), + ...(options.formatResult && { formatResult: options.formatResult }), + }; + const handler = createMcpHandler(() => { + const server = new McpServer( + options.serverInfo, + options.instructions ? { instructions: options.instructions } : {}, + ); + serveTools(server, options.tools, (tool, args) => callTool(tool, args, context)); + return server; + }); + return handler.fetch(request); + }, + }; +} diff --git a/src/generated/forge-mcp/_/tool.ts b/src/generated/forge-mcp/_/tool.ts new file mode 100644 index 00000000..3a31e9d8 --- /dev/null +++ b/src/generated/forge-mcp/_/tool.ts @@ -0,0 +1,183 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { Tool as McpTool } from '@modelcontextprotocol/server'; + +/** The arguments of a tool call, as the client sent them. */ +export type Args = Readonly>; + +/** A JSON Schema, as plain JSON. */ +export type JsonSchema = { readonly [key: string]: unknown }; + +/** The JSON Schema of a tool's arguments: always an object. */ +export type InputSchema = JsonSchema & { + readonly type: 'object'; + readonly properties?: { readonly [key: string]: JsonSchema }; + readonly required?: readonly string[]; +}; + +/** What a tool says about calling it. The hints describe the API method; they don't authorize anything. */ +export interface ToolAnnotations { + readonly title?: string; + readonly readOnlyHint: boolean; + readonly destructiveHint: boolean; + readonly idempotentHint: boolean; + readonly openWorldHint: boolean; +} + +/** A query parameter: its name, its value, and whether an array or object value is exploded. */ +export type QueryParam = readonly [name: string, value: unknown, explode: boolean]; + +/** A header parameter: its name and its value. */ +export type HeaderParam = readonly [name: string, value: unknown]; + +/** + * The request a tool call makes, relative to the API's base URL. The path has + * its parameters substituted and encoded; query and header values are + * serialized by {@link buildRequest}, which leaves out those that are + * `undefined` or `null`. + */ +export interface ApiRequest { + readonly path: string; + readonly query?: readonly QueryParam[]; + readonly headers?: readonly HeaderParam[]; + readonly body?: { readonly value: unknown; readonly mediaType: string }; +} + +/** + * A generated tool: what `tools/list` sends for it, and the code that makes + * its API request. + */ +export interface Tool { + readonly name: string; + readonly title?: string; + readonly description: string; + readonly inputSchema: InputSchema; + readonly annotations: ToolAnnotations; + /** The HTTP method of the API method, such as `GET`. */ + readonly method: string; + /** The path template of the API method, such as `/zones/{zone_id}`. */ + readonly path: string; + /** + * The OpenAPI extensions of the method's operation that forge doesn't read + * itself, such as `x-api-token-group`. For the server; clients never see them. + */ + readonly extensions?: { readonly [name: string]: unknown }; + /** Returns the API request for `args`. Throws {@link InvalidArguments}. */ + request(args: Args): ApiRequest; +} + +/** Arguments a tool can't be called with, such as a missing path parameter. */ +export class InvalidArguments extends Error { + override name = 'InvalidArguments'; +} + +/** + * Returns the argument `key`, for the path: a string, number or boolean, + * percent-encoded. Throws {@link InvalidArguments} when it is missing. + */ +export function pathParam(args: Args, key: string): string { + const value = args[key]; + if (value === undefined || value === null || value === '') { + throw new InvalidArguments(`Missing path parameter: ${key}`); + } + return encodeURIComponent(scalar(key, value)); +} + +/** + * Returns the HTTP request that calling `tool` with `args` makes, at + * `baseUrl`. Query parameters are serialized in OpenAPI's default `form` + * style. Values are not validated against the schema; the API does that. + */ +export function buildRequest(tool: Tool, args: Args, baseUrl: string): Request { + const missing = (tool.inputSchema.required ?? []).filter((key) => args[key] === undefined); + if (missing.length > 0) { + throw new InvalidArguments(`Missing required arguments: ${missing.join(', ')}`); + } + const api = tool.request(args); + const url = new URL(baseUrl.replace(/\/+$/, '') + api.path); + for (const [name, value, explode] of api.query ?? []) { + appendQuery(url.searchParams, name, value, explode); + } + const headers = new Headers({ Accept: 'application/json' }); + for (const [name, value] of api.headers ?? []) { + if (value !== undefined && value !== null) { + headers.set(name, Array.isArray(value) ? value.map((item) => scalar(name, item)).join(',') : scalar(name, value)); + } + } + const init: RequestInit = { method: tool.method, headers }; + if (api.body && api.body.value !== undefined) { + headers.set('Content-Type', api.body.mediaType); + init.body = JSON.stringify(api.body.value); + } + return new Request(url, init); +} + +/** Appends a query parameter in the `form` style: `a=1&a=2` exploded, `a=1,2` not. */ +function appendQuery(query: URLSearchParams, name: string, value: unknown, explode: boolean): void { + if (value === undefined || value === null) { + return; + } + if (Array.isArray(value)) { + const items = value.map((item) => scalar(name, item)); + if (explode) { + for (const item of items) { + query.append(name, item); + } + } else { + query.append(name, items.join(',')); + } + return; + } + if (typeof value === 'object') { + const entries = Object.entries(value).filter(([, item]) => item !== undefined && item !== null); + if (explode) { + for (const [key, item] of entries) { + query.append(key, scalar(name, item)); + } + } else { + query.append(name, entries.flatMap(([key, item]) => [key, scalar(name, item)]).join(',')); + } + return; + } + query.append(name, scalar(name, value)); +} + +function scalar(name: string, value: unknown): string { + if (typeof value === 'string') { + return value; + } + if (typeof value === 'number' || typeof value === 'boolean' || typeof value === 'bigint') { + return String(value); + } + throw new InvalidArguments(`${name} must be a string, number or boolean`); +} + +const listings = new WeakMap(); +const indexes = new WeakMap>(); + +/** + * Returns `tools` as `tools/list` sends them, without their request code, + * method, path and extensions. It is built once for each array of tools, and + * the same array every time after. + */ +export function listTools(tools: readonly Tool[]): readonly McpTool[] { + let listing = listings.get(tools); + if (!listing) { + listing = tools.map( + ({ request: _request, method: _method, path: _path, extensions: _extensions, ...tool }) => tool as McpTool, + ); + listings.set(tools, listing); + } + return listing; +} + +/** Returns `tools` by name. It is built once for each array of tools. */ +export function toolsByName(tools: readonly Tool[]): ReadonlyMap { + let index = indexes.get(tools); + if (!index) { + index = new Map(tools.map((tool) => [tool.name, tool])); + indexes.set(tools, index); + } + return index; +} diff --git a/src/generated/forge-mcp/abuseReports/appeals/tools.ts b/src/generated/forge-mcp/abuseReports/appeals/tools.ts new file mode 100644 index 00000000..3d29cf10 --- /dev/null +++ b/src/generated/forge-mcp/abuseReports/appeals/tools.ts @@ -0,0 +1,50 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `abuse_reports.appeals`. + */ +export const tools: readonly Tool[] = [ + { + name: "abuse_reports_appeals_eligibility", + title: "Check whether a report can be appealed", + description: "Returns whether the report is currently appealable, along with the signals behind that decision: whether it already has an open appeal, how many appeals have been submitted against it, and whether it has at least one mitigation that an appeal could reverse.\nReport-level appeals are currently available only for DMCA (copyright) reports. For other report types this operation returns the same `404 Report not found` response as a report that does not exist for the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID", + "type": "string" + }, + "report_id": { + "description": "Abuse Report ID", + "type": "string" + } + }, + required: [ + "account_id", + "report_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Check whether a report can be appealed" + }, + method: "GET", + path: "/accounts/{account_id}/abuse-reports/{report_id}/appeals/eligibility", + extensions: { + "x-api-token-group": [ + "Trust and Safety Write", + "Trust and Safety Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/abuse-reports/${pathParam(args, "report_id")}/appeals/eligibility`, + }), + }, +]; diff --git a/src/generated/forge-mcp/abuseReports/emails/tools.ts b/src/generated/forge-mcp/abuseReports/emails/tools.ts new file mode 100644 index 00000000..02e897f1 --- /dev/null +++ b/src/generated/forge-mcp/abuseReports/emails/tools.ts @@ -0,0 +1,114 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `abuse_reports.emails`. + */ +export const tools: readonly Tool[] = [ + { + name: "abuse_reports_emails_list", + title: "List abuse report emails", + description: "List emails sent to the customer for an abuse report. Returns all successful customer emails sent for the specified abuse report. Does not include emails sent to hosts or submitters.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID", + "type": "string" + }, + "page": { + "description": "Page number to retrieve (default 1)", + "type": "integer" + }, + "per_page": { + "description": "Number of emails per page (default 20, max 100)", + "type": "integer" + }, + "report_id": { + "description": "Abuse Report ID", + "type": "string" + } + }, + required: [ + "account_id", + "report_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List abuse report emails" + }, + method: "GET", + path: "/accounts/{account_id}/abuse-reports/{report_id}/emails", + extensions: { + "x-api-token-group": [ + "Trust and Safety Write", + "Trust and Safety Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/abuse-reports/${pathParam(args, "report_id")}/emails`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, + { + name: "abuse_reports_emails_list_submitted", + title: "List emails sent to an abuse report submitter", + description: "List successful emails sent to the submitter of a report submitted by the account. Does not include emails sent to customers or hosts.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID", + "type": "string" + }, + "page": { + "description": "Page number to retrieve (default 1).", + "type": "integer" + }, + "per_page": { + "description": "Number of emails per page (default 20, max 100).", + "type": "integer" + }, + "report_id": { + "description": "Public report code.", + "type": "string" + } + }, + required: [ + "account_id", + "report_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List emails sent to an abuse report submitter" + }, + method: "GET", + path: "/accounts/{account_id}/abuse-reports/submitted/{report_id}/emails", + extensions: { + "x-api-token-group": [ + "Trust and Safety Write", + "Trust and Safety Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/abuse-reports/submitted/${pathParam(args, "report_id")}/emails`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/abuseReports/mitigations/schemas.ts b/src/generated/forge-mcp/abuseReports/mitigations/schemas.ts new file mode 100644 index 00000000..14192be4 --- /dev/null +++ b/src/generated/forge-mcp/abuseReports/mitigations/schemas.ts @@ -0,0 +1,165 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `abuse-reports_AppealReason`. + */ +export const abuse_reports_AppealReason: JsonSchema = { + "description": "Reason why the customer is appealing.", + "enum": [ + "removed", + "misclassified" + ], + "type": "string" +}; + +/** + * The schema of `abuse-reports_AppealType`. + */ +export const abuse_reports_AppealType: JsonSchema = { + "description": "The type of appeal being submitted.", + "enum": [ + "counter_notice", + "content_removed" + ], + "type": "string" +}; + +/** + * The schema of `abuse-reports_DMCACounterNotice`. + */ +export const abuse_reports_DMCACounterNotice: JsonSchema = { + "description": "Counter-notice details supporting an appeal.", + "properties": { + "city": { + "type": "string" + }, + "company": { + "type": "string" + }, + "counter_notice_response": { + "type": "string" + }, + "country": { + "type": "string" + }, + "email": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "jurisdiction_consent": { + "type": "boolean" + }, + "perjury_attestation": { + "type": "boolean" + }, + "phone_number": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "state": { + "type": "string" + }, + "street_address": { + "type": "string" + }, + "urls": { + "items": { + "type": "string" + }, + "type": "array" + }, + "zip_code": { + "type": "string" + } + }, + "required": [ + "city", + "country", + "email", + "full_name", + "jurisdiction_consent", + "perjury_attestation", + "phone_number", + "signature", + "state", + "street_address", + "urls", + "zip_code" + ], + "type": "object" +}; + +/** + * The schema of `abuse-reports_MitigatedEntityType`. + */ +export const abuse_reports_MitigatedEntityType: JsonSchema = { + "description": "The type of entity targeted by a mitigation.", + "enum": [ + "url_pattern", + "account", + "zone", + "custom_expression" + ], + "type": "string" +}; + +/** + * The schema of `abuse-reports_MitigationAppeal`. + */ +export const abuse_reports_MitigationAppeal: JsonSchema = { + "properties": { + "id": { + "description": "ID of the mitigation to appeal.", + "type": "string" + }, + "reason": { + "$ref": "#/$defs/abuse-reports_AppealReason", + "description": "Reason why the customer is appealing." + } + }, + "required": [ + "id", + "reason" + ], + "type": "object" +}; + +/** + * The schema of `abuse-reports_MitigationAppealRequest`. + */ +export const abuse_reports_MitigationAppealRequest: JsonSchema = { + "description": "Submit an appeal for a report. Provide either a list of mitigations to appeal, or an appeal type with its supporting details, but not both. When type is \"counter_notice\", the counter-notice details are required.", + "properties": { + "appeals": { + "description": "List of mitigations to appeal.", + "items": { + "$ref": "#/$defs/abuse-reports_MitigationAppeal" + }, + "type": "array" + }, + "data": { + "$ref": "#/$defs/abuse-reports_DMCACounterNotice", + "description": "Counter-notice details supporting an appeal." + }, + "type": { + "$ref": "#/$defs/abuse-reports_AppealType", + "description": "The type of appeal being submitted." + } + }, + "type": "object" +}; + +/** + * The schema of `abuse-reports_MitigationType`. + */ +export const abuse_reports_MitigationType: JsonSchema = { + "description": "The type of mitigation applied to a reported entity.", + "type": "string" +}; diff --git a/src/generated/forge-mcp/abuseReports/mitigations/tools.ts b/src/generated/forge-mcp/abuseReports/mitigations/tools.ts new file mode 100644 index 00000000..a428da58 --- /dev/null +++ b/src/generated/forge-mcp/abuseReports/mitigations/tools.ts @@ -0,0 +1,168 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { abuse_reports_MitigationStatus } from "../schemas.js"; +import { + abuse_reports_AppealReason, + abuse_reports_AppealType, + abuse_reports_DMCACounterNotice, + abuse_reports_MitigatedEntityType, + abuse_reports_MitigationAppeal, + abuse_reports_MitigationAppealRequest, + abuse_reports_MitigationType, +} from "./schemas.js"; + +/** + * The tools of `abuse_reports.mitigations`. + */ +export const tools: readonly Tool[] = [ + { + name: "abuse_reports_mitigations_list", + title: "List abuse report mitigations", + description: "List mitigations done to remediate the abuse report.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID", + "type": "string" + }, + "effective_after": { + "description": "Returns mitigation that were dispatched after the given date", + "type": "string" + }, + "effective_before": { + "description": "Returns mitigations that were dispatched before the given date", + "type": "string" + }, + "entity_type": { + "$ref": "#/$defs/abuse-reports_MitigatedEntityType", + "description": "Filter by the type of entity the mitigation impacts." + }, + "page": { + "description": "Where in pagination to start listing abuse reports", + "type": "integer" + }, + "per_page": { + "description": "How many abuse reports per page to list", + "type": "integer" + }, + "report_id": { + "description": "Abuse Report ID", + "type": "string" + }, + "sort": { + "description": "A property to sort by, followed by the order", + "enum": [ + "type,asc", + "type,desc", + "effective_date,asc", + "effective_date,desc", + "status,asc", + "status,desc", + "entity_type,asc", + "entity_type,desc" + ], + "type": "string" + }, + "status": { + "$ref": "#/$defs/abuse-reports_MitigationStatus", + "description": "Filter by the status of the mitigation." + }, + "type": { + "$ref": "#/$defs/abuse-reports_MitigationType", + "description": "Filter by the type of mitigation. This filter parameter can be specified multiple times to include multiple types of mitigations in the result set." + } + }, + required: [ + "account_id", + "report_id" + ], + $defs: { + "abuse-reports_MitigatedEntityType": abuse_reports_MitigatedEntityType, + "abuse-reports_MitigationStatus": abuse_reports_MitigationStatus, + "abuse-reports_MitigationType": abuse_reports_MitigationType, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List abuse report mitigations" + }, + method: "GET", + path: "/accounts/{account_id}/abuse-reports/{report_id}/mitigations", + extensions: { + "x-api-token-group": [ + "Trust and Safety Write", + "Trust and Safety Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/abuse-reports/${pathParam(args, "report_id")}/mitigations`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["sort", args["sort"], true], + ["type", args["type"], true], + ["effective_before", args["effective_before"], true], + ["effective_after", args["effective_after"], true], + ["status", args["status"], true], + ["entity_type", args["entity_type"], true], + ], + }), + }, + { + name: "abuse_reports_mitigations_review", + title: "Request review on mitigations", + description: "Request a review of mitigations applied because of an abuse report, or submit a report-level appeal.\n\n- To request a review of specific mitigations, send `appeals` with the mitigation IDs and reasons. Repeating a request for a mitigation with an unresolved appeal is idempotent and returns that mitigation in the in-review state.\n- To submit a report-level appeal, send `type` and, for a `counter_notice`, the counter-notice details in `data`. Report-level appeals are currently available only for DMCA (copyright) reports.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID", + "type": "string" + }, + "body": { + "$ref": "#/$defs/abuse-reports_MitigationAppealRequest" + }, + "report_id": { + "description": "Abuse Report ID", + "type": "string" + } + }, + required: [ + "account_id", + "report_id", + "body" + ], + $defs: { + "abuse-reports_AppealReason": abuse_reports_AppealReason, + "abuse-reports_AppealType": abuse_reports_AppealType, + "abuse-reports_DMCACounterNotice": abuse_reports_DMCACounterNotice, + "abuse-reports_MitigationAppeal": abuse_reports_MitigationAppeal, + "abuse-reports_MitigationAppealRequest": abuse_reports_MitigationAppealRequest, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Request review on mitigations" + }, + method: "POST", + path: "/accounts/{account_id}/abuse-reports/{report_id}/mitigations/appeal", + extensions: { + "x-api-token-group": [ + "Trust and Safety Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/abuse-reports/${pathParam(args, "report_id")}/mitigations/appeal`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/abuseReports/schemas.ts b/src/generated/forge-mcp/abuseReports/schemas.ts new file mode 100644 index 00000000..679f14dc --- /dev/null +++ b/src/generated/forge-mcp/abuseReports/schemas.ts @@ -0,0 +1,928 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../_/tool.js"; + +/** + * The schema of `abuse-reports_CSAMReport`. + */ +export const abuse_reports_CSAMReport: JsonSchema = { + "properties": { + "act": { + "enum": [ + "abuse_children" + ], + "type": "string" + }, + "comments": { + "description": "Any additional comments about the infringement not exceeding 2000 characters. Comments are kept internal to Cloudflare and not shared with the host or customer as part of regular processing. For delegated reports, comments may be shared in full.", + "type": "string" + }, + "company": { + "description": "Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "country": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).\n", + "type": "string" + }, + "email": { + "description": "A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "email2": { + "description": "Should match the value provided in `email`", + "type": "string" + }, + "host_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send", + "send-anon" + ], + "type": "string" + }, + "justification": { + "description": "A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters.\n", + "type": "string" + }, + "name": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "ncmec_notification": { + "description": "Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send", + "send-anon" + ], + "type": "string" + }, + "owner_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send", + "send-anon", + "none" + ], + "type": "string" + }, + "reported_country": { + "description": "Text containing 2 characters", + "type": "string" + }, + "reported_user_agent": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "tele": { + "description": "Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "title": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "urls": { + "description": "A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + } + }, + "required": [ + "act", + "email", + "email2", + "name", + "urls", + "host_notification", + "justification", + "ncmec_notification", + "owner_notification" + ], + "type": "object" +}; + +/** + * The schema of `abuse-reports_DMCAReport`. + */ +export const abuse_reports_DMCAReport: JsonSchema = { + "properties": { + "act": { + "enum": [ + "abuse_dmca" + ], + "type": "string" + }, + "address1": { + "description": "Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "agent_name": { + "description": "The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "agree": { + "description": "Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports", + "enum": [ + 1 + ], + "type": "integer" + }, + "city": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "comments": { + "description": "Any additional comments about the infringement not exceeding 2000 characters. Comments are kept internal to Cloudflare and not shared with the host or customer as part of regular processing. For delegated reports, comments may be shared in full.", + "type": "string" + }, + "company": { + "description": "Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "country": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).\n", + "type": "string" + }, + "email": { + "description": "A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "email2": { + "description": "Should match the value provided in `email`", + "type": "string" + }, + "host_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send" + ], + "type": "string" + }, + "name": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "original_work": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).\n", + "type": "string" + }, + "owner_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send" + ], + "type": "string" + }, + "reported_country": { + "description": "Text containing 2 characters", + "type": "string" + }, + "reported_user_agent": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "signature": { + "description": "Required for DMCA reports, should be same as Name. An affirmation that all information in the report is true and accurate while agreeing to the policies of Cloudflare's abuse reports", + "type": "string" + }, + "state": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "tele": { + "description": "Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "title": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "urls": { + "description": "A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + } + }, + "required": [ + "act", + "email", + "email2", + "name", + "urls", + "address1", + "agent_name", + "agree", + "city", + "country", + "host_notification", + "original_work", + "owner_notification", + "signature", + "state" + ], + "type": "object" +}; + +/** + * The schema of `abuse-reports_GeneralReport`. + */ +export const abuse_reports_GeneralReport: JsonSchema = { + "properties": { + "act": { + "enum": [ + "abuse_general" + ], + "type": "string" + }, + "comments": { + "description": "Any additional comments about the infringement not exceeding 2000 characters. Comments are kept internal to Cloudflare and not shared with the host or customer as part of regular processing. For delegated reports, comments may be shared in full.", + "type": "string" + }, + "company": { + "description": "Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "destination_ips": { + "description": "A list of IP addresses separated by ‘\\n’ (new line character). The list of destination IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique.", + "type": "string" + }, + "email": { + "description": "A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "email2": { + "description": "Should match the value provided in `email`", + "type": "string" + }, + "host_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send", + "send-anon" + ], + "type": "string" + }, + "justification": { + "description": "A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters.\n", + "type": "string" + }, + "name": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "owner_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send", + "send-anon" + ], + "type": "string" + }, + "ports_protocols": { + "description": "A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. Each individual port/protocol should not exceed 100 characters. The list should not have more than 30 unique ports and protocols.", + "type": "string" + }, + "reported_country": { + "description": "Text containing 2 characters", + "type": "string" + }, + "reported_user_agent": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "source_ips": { + "description": "A list of IP addresses separated by ‘\\n’ (new line character). The list of source IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique.", + "type": "string" + }, + "tele": { + "description": "Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "title": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "urls": { + "description": "A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + } + }, + "required": [ + "act", + "email", + "email2", + "name", + "urls", + "host_notification", + "justification", + "owner_notification" + ], + "type": "object" +}; + +/** + * The schema of `abuse-reports_MitigationStatus`. + */ +export const abuse_reports_MitigationStatus: JsonSchema = { + "description": "The status of a mitigation", + "enum": [ + "pending", + "active", + "in_review", + "cancelled", + "removed" + ], + "type": "string" +}; + +/** + * The schema of `abuse-reports_NCSEIReport`. + */ +export const abuse_reports_NCSEIReport: JsonSchema = { + "properties": { + "act": { + "enum": [ + "abuse_ncsei" + ], + "type": "string" + }, + "comments": { + "description": "Any additional comments about the infringement not exceeding 2000 characters. Comments are kept internal to Cloudflare and not shared with the host or customer as part of regular processing. For delegated reports, comments may be shared in full.", + "type": "string" + }, + "company": { + "description": "Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "country": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).\n", + "type": "string" + }, + "email": { + "description": "A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "email2": { + "description": "Should match the value provided in `email`", + "type": "string" + }, + "host_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send", + "send-anon" + ], + "type": "string" + }, + "name": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "ncsei_subject_representation": { + "description": "If the submitter is the target of NCSEI in the URLs of the abuse report.", + "type": "boolean" + }, + "owner_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send", + "send-anon", + "none" + ], + "type": "string" + }, + "reported_country": { + "description": "Text containing 2 characters", + "type": "string" + }, + "reported_user_agent": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "tele": { + "description": "Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "title": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "urls": { + "description": "A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + } + }, + "required": [ + "act", + "email", + "email2", + "name", + "urls", + "host_notification", + "ncsei_subject_representation", + "owner_notification" + ], + "type": "object" +}; + +/** + * The schema of `abuse-reports_PhishingReport`. + */ +export const abuse_reports_PhishingReport: JsonSchema = { + "properties": { + "act": { + "enum": [ + "abuse_phishing" + ], + "type": "string" + }, + "comments": { + "description": "Any additional comments about the infringement not exceeding 2000 characters. Comments are kept internal to Cloudflare and not shared with the host or customer as part of regular processing. For delegated reports, comments may be shared in full.", + "type": "string" + }, + "company": { + "description": "Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "email": { + "description": "A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "email2": { + "description": "Should match the value provided in `email`", + "type": "string" + }, + "host_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send", + "send-anon" + ], + "type": "string" + }, + "justification": { + "description": "A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters.\n", + "type": "string" + }, + "name": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "original_work": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).\n", + "type": "string" + }, + "owner_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send", + "send-anon" + ], + "type": "string" + }, + "reported_country": { + "description": "Text containing 2 characters", + "type": "string" + }, + "reported_user_agent": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "tele": { + "description": "Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "title": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "urls": { + "description": "A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + } + }, + "required": [ + "act", + "email", + "email2", + "name", + "urls", + "host_notification", + "justification", + "owner_notification" + ], + "type": "object" +}; + +/** + * The schema of `abuse-reports_RegistrarWhoIsFields`. + */ +export const abuse_reports_RegistrarWhoIsFields: JsonSchema = { + "description": "RDP-mandated fields for registrar WHOIS data disclosure requests.", + "properties": { + "reg_who_authorization_statement": { + "description": "Optional authorization statement or power of attorney per RDP 10.2.1.3.", + "type": "string" + }, + "reg_who_good_faith_affirmation": { + "description": "Affirmation that the request is made in good faith per RDP 10.2.4. Must be true.", + "type": "boolean" + }, + "reg_who_lawful_processing_agreement": { + "description": "Agreement to process data lawfully per RDP 10.2.5. Must be true.", + "type": "boolean" + }, + "reg_who_legal_basis": { + "description": "Legal rights and rationale for the request per RDP 10.2.3. Required for all WHOIS requests.", + "type": "string" + }, + "reg_who_request_type": { + "description": "The type of WHOIS data request per RDP procedure.", + "enum": [ + "disclosure", + "invalid_whois" + ], + "type": "string" + }, + "reg_who_requested_data_elements": { + "description": "The specific WHOIS data elements being requested per RDP 10.2.2. Required for all WHOIS requests.", + "items": { + "enum": [ + "registrant_name", + "registrant_organization", + "registrant_email", + "registrant_phone", + "registrant_address", + "registrant_address_country", + "registrant_address_postal_code", + "admin_name", + "admin_organization", + "admin_email", + "admin_phone", + "admin_address", + "tech_name", + "tech_organization", + "tech_email", + "tech_phone", + "tech_address" + ], + "type": "string" + }, + "maxItems": 17, + "minItems": 1, + "type": "array" + }, + "reg_who_requestor_type": { + "description": "The nature of the requestor per RDP 10.2.1.2.", + "enum": [ + "government", + "corporation", + "individual" + ], + "type": "string" + } + }, + "required": [ + "reg_who_good_faith_affirmation", + "reg_who_lawful_processing_agreement", + "reg_who_legal_basis", + "reg_who_request_type", + "reg_who_requested_data_elements" + ], + "type": "object" +}; + +/** + * The schema of `abuse-reports_RegistrarWhoisReport`. + */ +export const abuse_reports_RegistrarWhoisReport: JsonSchema = { + "properties": { + "act": { + "enum": [ + "abuse_registrar_whois" + ], + "type": "string" + }, + "comments": { + "description": "Any additional comments about the infringement not exceeding 2000 characters. Comments are kept internal to Cloudflare and not shared with the host or customer as part of regular processing. For delegated reports, comments may be shared in full.", + "type": "string" + }, + "company": { + "description": "Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "email": { + "description": "A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "email2": { + "description": "Should match the value provided in `email`", + "type": "string" + }, + "name": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "owner_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send", + "send-anon", + "none" + ], + "type": "string" + }, + "reg_who_request": { + "$ref": "#/$defs/abuse-reports_RegistrarWhoIsFields", + "description": "RDP-mandated fields for registrar WHOIS data disclosure requests." + }, + "reported_country": { + "description": "Text containing 2 characters", + "type": "string" + }, + "reported_user_agent": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "tele": { + "description": "Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "title": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "urls": { + "description": "A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + } + }, + "required": [ + "act", + "email", + "email2", + "name", + "urls", + "owner_notification" + ], + "type": "object" +}; + +/** + * The schema of `abuse-reports_ReportStatus`. + */ +export const abuse_reports_ReportStatus: JsonSchema = { + "description": "An enum value that represents the status of an abuse record", + "enum": [ + "accepted", + "in_review" + ], + "type": "string" +}; + +/** + * The schema of `abuse-reports_ReportType`. + */ +export const abuse_reports_ReportType: JsonSchema = { + "description": "The abuse report type", + "enum": [ + "PHISH", + "GEN", + "THREAT", + "DMCA", + "EMER", + "TM", + "REG_WHO", + "NCSEI", + "NETWORK" + ], + "type": "string" +}; + +/** + * The schema of `abuse-reports_SubmitReportRequest`. + */ +export const abuse_reports_SubmitReportRequest: JsonSchema = { + "oneOf": [ + { + "$ref": "#/$defs/abuse-reports_DMCAReport" + }, + { + "$ref": "#/$defs/abuse-reports_TrademarkReport" + }, + { + "$ref": "#/$defs/abuse-reports_GeneralReport" + }, + { + "$ref": "#/$defs/abuse-reports_PhishingReport" + }, + { + "$ref": "#/$defs/abuse-reports_CSAMReport" + }, + { + "$ref": "#/$defs/abuse-reports_ThreatReport" + }, + { + "$ref": "#/$defs/abuse-reports_RegistrarWhoisReport" + }, + { + "$ref": "#/$defs/abuse-reports_NCSEIReport" + } + ] +}; + +/** + * The schema of `abuse-reports_SubmittedAbuseReportStatus`. + */ +export const abuse_reports_SubmittedAbuseReportStatus: JsonSchema = { + "description": "Status visible to the account that submitted the report.", + "enum": [ + "submitted", + "accepted", + "denied" + ], + "type": "string" +}; + +/** + * The schema of `abuse-reports_ThreatReport`. + */ +export const abuse_reports_ThreatReport: JsonSchema = { + "properties": { + "act": { + "enum": [ + "abuse_threat" + ], + "type": "string" + }, + "comments": { + "description": "Any additional comments about the infringement not exceeding 2000 characters. Comments are kept internal to Cloudflare and not shared with the host or customer as part of regular processing. For delegated reports, comments may be shared in full.", + "type": "string" + }, + "company": { + "description": "Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "email": { + "description": "A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "email2": { + "description": "Should match the value provided in `email`", + "type": "string" + }, + "host_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send", + "send-anon" + ], + "type": "string" + }, + "justification": { + "description": "A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters.\n", + "type": "string" + }, + "name": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "owner_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send", + "send-anon" + ], + "type": "string" + }, + "reported_country": { + "description": "Text containing 2 characters", + "type": "string" + }, + "reported_user_agent": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "tele": { + "description": "Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "title": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "urls": { + "description": "A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + } + }, + "required": [ + "act", + "email", + "email2", + "name", + "urls", + "host_notification", + "justification", + "owner_notification" + ], + "type": "object" +}; + +/** + * The schema of `abuse-reports_TrademarkReport`. + */ +export const abuse_reports_TrademarkReport: JsonSchema = { + "properties": { + "act": { + "enum": [ + "abuse_trademark" + ], + "type": "string" + }, + "comments": { + "description": "Any additional comments about the infringement not exceeding 2000 characters. Comments are kept internal to Cloudflare and not shared with the host or customer as part of regular processing. For delegated reports, comments may be shared in full.", + "type": "string" + }, + "company": { + "description": "Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "email": { + "description": "A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "email2": { + "description": "Should match the value provided in `email`", + "type": "string" + }, + "host_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send" + ], + "type": "string" + }, + "justification": { + "description": "A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters.\n", + "type": "string" + }, + "name": { + "description": "Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "owner_notification": { + "description": "Notification type based on the abuse type. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.\n", + "enum": [ + "send" + ], + "type": "string" + }, + "reported_country": { + "description": "Text containing 2 characters", + "type": "string" + }, + "reported_user_agent": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "tele": { + "description": "Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + }, + "title": { + "description": "Text not exceeding 255 characters", + "type": "string" + }, + "trademark_number": { + "description": "Text not exceeding 1000 characters", + "type": "string" + }, + "trademark_office": { + "description": "Text not exceeding 1000 characters", + "type": "string" + }, + "trademark_symbol": { + "description": "Text not exceeding 1000 characters", + "type": "string" + }, + "urls": { + "description": "A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).", + "type": "string" + } + }, + "required": [ + "act", + "email", + "email2", + "name", + "urls", + "host_notification", + "justification", + "owner_notification", + "trademark_number", + "trademark_office", + "trademark_symbol" + ], + "type": "object" +}; diff --git a/src/generated/forge-mcp/abuseReports/tools.ts b/src/generated/forge-mcp/abuseReports/tools.ts new file mode 100644 index 00000000..4a536e2c --- /dev/null +++ b/src/generated/forge-mcp/abuseReports/tools.ts @@ -0,0 +1,353 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../_/tool.js"; +import { + abuse_reports_CSAMReport, + abuse_reports_DMCAReport, + abuse_reports_GeneralReport, + abuse_reports_MitigationStatus, + abuse_reports_NCSEIReport, + abuse_reports_PhishingReport, + abuse_reports_RegistrarWhoIsFields, + abuse_reports_RegistrarWhoisReport, + abuse_reports_ReportStatus, + abuse_reports_ReportType, + abuse_reports_SubmitReportRequest, + abuse_reports_SubmittedAbuseReportStatus, + abuse_reports_ThreatReport, + abuse_reports_TrademarkReport, +} from "./schemas.js"; + +/** + * The tools of `abuse_reports`. + */ +export const tools: readonly Tool[] = [ + { + name: "abuse_reports_create", + title: "Submit an abuse report", + description: "Submit an abuse report of a particular type.\n\nRequires the abuse-reports entitlement on the account (Enterprise\naccounts have it by default; other accounts must request access) and an\nAPI token with the `Trust and Safety Write` permission. If the account\nis not entitled, the request is rejected with an HTTP `401` response\n(see below).\n\nDelegated reports: In limited circumstances, Cloudflare works with\nselect customers who have established abuse-handling programs. For\nthese customers, Cloudflare may forward abuse reports directly and in\nfull—including reporter contact information, comments, and supporting\nevidence—without redaction or preprocessing by Cloudflare. This allows\nthe customer to investigate and respond using their own policies and\nprocesses. For delegated reports, the report—including contact\ninformation and comments—will be forwarded to the customer in full\nregardless of the `host_notification` and `owner_notification` values.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID", + "type": "string" + }, + "body": { + "$ref": "#/$defs/abuse-reports_SubmitReportRequest" + }, + "report_type": { + "description": "The report type to be submitted. Example: abuse_general", + "type": "string" + } + }, + required: [ + "account_id", + "report_type", + "body" + ], + $defs: { + "abuse-reports_CSAMReport": abuse_reports_CSAMReport, + "abuse-reports_DMCAReport": abuse_reports_DMCAReport, + "abuse-reports_GeneralReport": abuse_reports_GeneralReport, + "abuse-reports_NCSEIReport": abuse_reports_NCSEIReport, + "abuse-reports_PhishingReport": abuse_reports_PhishingReport, + "abuse-reports_RegistrarWhoIsFields": abuse_reports_RegistrarWhoIsFields, + "abuse-reports_RegistrarWhoisReport": abuse_reports_RegistrarWhoisReport, + "abuse-reports_SubmitReportRequest": abuse_reports_SubmitReportRequest, + "abuse-reports_ThreatReport": abuse_reports_ThreatReport, + "abuse-reports_TrademarkReport": abuse_reports_TrademarkReport, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Submit an abuse report" + }, + method: "POST", + path: "/accounts/{account_id}/abuse-reports/{report_param}", + extensions: { + "x-api-token-group": [ + "Trust and Safety Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/abuse-reports/${pathParam(args, "report_type")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "abuse_reports_get", + title: "Get an abuse report against the account", + description: "Retrieve the details of an abuse report made against a domain or other content associated with the account. To retrieve a report that the account submitted, use the submitted abuse report endpoint instead.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID", + "type": "string" + }, + "report_id": { + "description": "Public report ID.", + "type": "string" + } + }, + required: [ + "account_id", + "report_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get an abuse report against the account" + }, + method: "GET", + path: "/accounts/{account_id}/abuse-reports/{report_param}", + extensions: { + "x-api-token-group": [ + "Trust and Safety Write", + "Trust and Safety Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/abuse-reports/${pathParam(args, "report_id")}`, + }), + }, + { + name: "abuse_reports_get_submitted", + title: "Get a submitted abuse report", + description: "Retrieve a report submitted by the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID", + "type": "string" + }, + "report_id": { + "description": "Public report code.", + "type": "string" + } + }, + required: [ + "account_id", + "report_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a submitted abuse report" + }, + method: "GET", + path: "/accounts/{account_id}/abuse-reports/submitted/{report_id}", + extensions: { + "x-api-token-group": [ + "Trust and Safety Write", + "Trust and Safety Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/abuse-reports/submitted/${pathParam(args, "report_id")}`, + }), + }, + { + name: "abuse_reports_list", + title: "List abuse reports against the account", + description: "List abuse reports made against domains or other content associated with the account. To list reports that the account submitted, use the submitted abuse reports endpoint instead.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID", + "type": "string" + }, + "created_after": { + "description": "Returns reports created after the specified date", + "type": "string" + }, + "created_before": { + "description": "Returns reports created before the specified date", + "type": "string" + }, + "domain": { + "description": "Filter by domain name related to the abuse report", + "type": "string" + }, + "mitigation_status": { + "$ref": "#/$defs/abuse-reports_MitigationStatus", + "description": "Filter reports that have any mitigations in the given status." + }, + "page": { + "description": "Where in pagination to start listing abuse reports", + "type": "integer" + }, + "per_page": { + "description": "How many abuse reports per page to list", + "type": "integer" + }, + "search": { + "description": "Free-text search. Returns reports whose report ID starts with the term or whose domain contains the term, both case-insensitively. Surrounding whitespace is ignored, and an empty value is treated as absent. Combined with the other filters using AND.", + "type": "string" + }, + "sort": { + "description": "A property to sort by, followed by the order (id, cdate, domain, type, status)", + "type": "string" + }, + "status": { + "$ref": "#/$defs/abuse-reports_ReportStatus", + "description": "Filter by the status of the report." + }, + "type": { + "$ref": "#/$defs/abuse-reports_ReportType", + "description": "Filter by the type of the report." + } + }, + required: [ + "account_id" + ], + $defs: { + "abuse-reports_MitigationStatus": abuse_reports_MitigationStatus, + "abuse-reports_ReportStatus": abuse_reports_ReportStatus, + "abuse-reports_ReportType": abuse_reports_ReportType, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List abuse reports against the account" + }, + method: "GET", + path: "/accounts/{account_id}/abuse-reports", + extensions: { + "x-api-token-group": [ + "Trust and Safety Write", + "Trust and Safety Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/abuse-reports`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["sort", args["sort"], true], + ["search", args["search"], true], + ["domain", args["domain"], true], + ["created_before", args["created_before"], true], + ["created_after", args["created_after"], true], + ["status", args["status"], true], + ["type", args["type"], true], + ["mitigation_status", args["mitigation_status"], true], + ], + }), + }, + { + name: "abuse_reports_list_submitted", + title: "List submitted abuse reports", + description: "List abuse reports submitted by the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID", + "type": "string" + }, + "created_after": { + "description": "Return reports submitted after this time.", + "format": "date-time", + "type": "string" + }, + "created_before": { + "description": "Return reports submitted before this time.", + "format": "date-time", + "type": "string" + }, + "domain": { + "description": "Filter by reported domain. This parameter can be specified multiple times.", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Filter by report code.", + "type": "string" + }, + "page": { + "default": 1, + "description": "Page of submitted reports to return.", + "type": "integer" + }, + "per_page": { + "default": 100, + "description": "Number of submitted reports per page.", + "type": "integer" + }, + "sort": { + "description": "A property and direction to sort by (id, cdate, domain, type, status).", + "type": "string" + }, + "status": { + "description": "Filter by submitter-facing status. This parameter can be specified multiple times.", + "items": { + "$ref": "#/$defs/abuse-reports_SubmittedAbuseReportStatus" + }, + "type": "array" + }, + "type": { + "description": "Filter by report type. This parameter can be specified multiple times.", + "items": { + "$ref": "#/$defs/abuse-reports_ReportType" + }, + "type": "array" + } + }, + required: [ + "account_id" + ], + $defs: { + "abuse-reports_ReportType": abuse_reports_ReportType, + "abuse-reports_SubmittedAbuseReportStatus": abuse_reports_SubmittedAbuseReportStatus, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List submitted abuse reports" + }, + method: "GET", + path: "/accounts/{account_id}/abuse-reports/submitted", + extensions: { + "x-api-token-group": [ + "Trust and Safety Write", + "Trust and Safety Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/abuse-reports/submitted`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["sort", args["sort"], true], + ["id", args["id"], true], + ["domain", args["domain"], true], + ["created_before", args["created_before"], true], + ["created_after", args["created_after"], true], + ["status", args["status"], true], + ["type", args["type"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/applications/schemas.ts b/src/generated/forge-mcp/accounts/applications/schemas.ts new file mode 100644 index 00000000..5d021016 --- /dev/null +++ b/src/generated/forge-mcp/accounts/applications/schemas.ts @@ -0,0 +1,201 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `alexandria_application_hostnames`. + */ +export const alexandria_application_hostnames: JsonSchema = { + "description": "Hostnames matched by the application.", + "items": { + "type": "string" + }, + "type": "array" +}; + +/** + * The schema of `alexandria_application_human_id`. + */ +export const alexandria_application_human_id: JsonSchema = { + "description": "Human-readable identifier for the application.", + "type": "string" +}; + +/** + * The schema of `alexandria_application_ip_subnets`. + */ +export const alexandria_application_ip_subnets: JsonSchema = { + "description": "IP subnets for this application. Custom application create and update requests accept IPv4 prefix lengths /8 through /32 and IPv6 prefix lengths /32 through /128.", + "items": { + "type": "string" + }, + "type": "array" +}; + +/** + * The schema of `alexandria_application_name`. + */ +export const alexandria_application_name: JsonSchema = { + "description": "Application name.", + "type": "string" +}; + +/** + * The schema of `alexandria_application_port_protocols`. + */ +export const alexandria_application_port_protocols: JsonSchema = { + "description": "Ports matched by the application, in `protocol/port` or inclusive `protocol/start-end` format (for example, `tcp/443` or `udp/10000-20000`). TCP and UDP ports must be between 0 and 65535.", + "items": { + "type": "string" + }, + "type": "array" +}; + +/** + * The schema of `alexandria_application_support_domains`. + */ +export const alexandria_application_support_domains: JsonSchema = { + "description": "Support domains matched by the application.", + "items": { + "type": "string" + }, + "type": "array" +}; + +/** + * The schema of `alexandria_create_application_request`. + */ +export const alexandria_create_application_request: JsonSchema = { + "allOf": [ + { + "properties": { + "category_id": { + "$ref": "#/$defs/alexandria_category_id", + "description": "Numeric identifier for an application category." + }, + "hostnames": { + "$ref": "#/$defs/alexandria_application_hostnames", + "description": "Hostnames matched by the application." + }, + "human_id": { + "$ref": "#/$defs/alexandria_application_human_id", + "description": "Human-readable identifier for the application." + }, + "ip_subnets": { + "$ref": "#/$defs/alexandria_application_ip_subnets", + "description": "IP subnets for this application. Custom application create and update requests accept IPv4 prefix lengths /8 through /32 and IPv6 prefix lengths /32 through /128." + }, + "name": { + "$ref": "#/$defs/alexandria_application_name", + "description": "Application name." + }, + "port_protocols": { + "$ref": "#/$defs/alexandria_application_port_protocols", + "description": "Ports matched by the application, in `protocol/port` or inclusive `protocol/start-end` format (for example, `tcp/443` or `udp/10000-20000`). TCP and UDP ports must be between 0 and 65535." + }, + "support_domains": { + "$ref": "#/$defs/alexandria_application_support_domains", + "description": "Support domains matched by the application." + } + }, + "required": [ + "category_id", + "human_id", + "name" + ], + "type": "object" + }, + { + "anyOf": [ + { + "properties": { + "hostnames": { + "allOf": [ + { + "$ref": "#/$defs/alexandria_application_hostnames" + }, + { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + } + ] + } + }, + "required": [ + "hostnames" + ], + "type": "object" + }, + { + "properties": { + "ip_subnets": { + "allOf": [ + { + "$ref": "#/$defs/alexandria_application_ip_subnets" + }, + { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + } + ] + } + }, + "required": [ + "ip_subnets" + ], + "type": "object" + } + ] + } + ], + "description": "Defines a custom application. At least one hostname or IP subnet is required.\nSupport domains and port/protocol pairs do not satisfy this requirement.\nA NUL character (U+0000) in any string value returns `400`.\n" +}; + +/** + * The schema of `alexandria_lookup_applications_request`. + */ +export const alexandria_lookup_applications_request: JsonSchema = { + "properties": { + "lookup": { + "description": "Rule sentence to search for complete application names. Leading and trailing\nwhitespace is trimmed before the length is checked. Control characters other\nthan tab and line breaks return `400`.\n", + "type": "string" + } + }, + "required": [ + "lookup" + ], + "type": "object" +}; + +/** + * The schema of `alexandria_update_application_request`. + */ +export const alexandria_update_application_request: JsonSchema = { + "description": "Update the network matchers for the application. The service preserves omitted\nmatcher lists; send an empty array to clear a list. The resulting application must\ncontain at least one hostname or IP subnet. Support domains and port/protocol pairs\ndo not satisfy this requirement.\nA NUL character (U+0000) in any string value returns `400`.\n", + "properties": { + "hostnames": { + "$ref": "#/$defs/alexandria_application_hostnames", + "description": "Hostnames matched by the application." + }, + "ip_subnets": { + "$ref": "#/$defs/alexandria_application_ip_subnets", + "description": "IP subnets for this application. Custom application create and update requests accept IPv4 prefix lengths /8 through /32 and IPv6 prefix lengths /32 through /128." + }, + "port_protocols": { + "$ref": "#/$defs/alexandria_application_port_protocols", + "description": "Ports matched by the application, in `protocol/port` or inclusive `protocol/start-end` format (for example, `tcp/443` or `udp/10000-20000`). TCP and UDP ports must be between 0 and 65535." + }, + "support_domains": { + "$ref": "#/$defs/alexandria_application_support_domains", + "description": "Support domains matched by the application." + } + }, + "type": "object" +}; diff --git a/src/generated/forge-mcp/accounts/applications/tools.ts b/src/generated/forge-mcp/accounts/applications/tools.ts new file mode 100644 index 00000000..c0262bd6 --- /dev/null +++ b/src/generated/forge-mcp/accounts/applications/tools.ts @@ -0,0 +1,308 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { alexandria_category_id } from "../schemas.js"; +import { + alexandria_application_hostnames, + alexandria_application_human_id, + alexandria_application_ip_subnets, + alexandria_application_name, + alexandria_application_port_protocols, + alexandria_application_support_domains, + alexandria_create_application_request, + alexandria_lookup_applications_request, + alexandria_update_application_request, +} from "./schemas.js"; + +/** + * The tools of `accounts.applications`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_applications_create", + title: "Create application", + description: "Create a custom application for an account from a name, category, and optional network matchers.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account ID.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/alexandria_create_application_request" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "alexandria_application_hostnames": alexandria_application_hostnames, + "alexandria_application_human_id": alexandria_application_human_id, + "alexandria_application_ip_subnets": alexandria_application_ip_subnets, + "alexandria_application_name": alexandria_application_name, + "alexandria_application_port_protocols": alexandria_application_port_protocols, + "alexandria_application_support_domains": alexandria_application_support_domains, + "alexandria_category_id": alexandria_category_id, + "alexandria_create_application_request": alexandria_create_application_request, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create application" + }, + method: "POST", + path: "/accounts/{account_id}/resource-library/applications", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/resource-library/applications`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_applications_delete", + title: "Delete application", + description: "Delete a custom application and all of its versions. Deletion is rejected when other resources reference the application.\n\nConfirm with the user before calling this tool. This operation deletes the custom application and all of its versions. This action cannot be undone.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account ID.", + "type": "string" + }, + "id": { + "description": "Application ID.", + "type": "string" + } + }, + required: [ + "account_id", + "id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete application" + }, + method: "DELETE", + path: "/accounts/{account_id}/resource-library/applications/{id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/resource-library/applications/${pathParam(args, "id")}`, + }), + }, + { + name: "accounts_applications_get", + title: "Get application", + description: "Retrieve an application available to the account by its numeric application ID.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account ID.", + "type": "string" + }, + "id": { + "description": "Application ID.", + "type": "string" + } + }, + required: [ + "account_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get application" + }, + method: "GET", + path: "/accounts/{account_id}/resource-library/applications/{id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/resource-library/applications/${pathParam(args, "id")}`, + }), + }, + { + name: "accounts_applications_list", + title: "List applications", + description: "List the applications available to an account, both the applications Cloudflare\ncurates and the custom applications the account has defined.\n\nResults are paginated. Page with `cursor` so that applications added or removed\nbetween requests do not make other results repeat or go missing; `offset` paging can\nrepeat or miss results when the list changes between requests. Use `filter` and\n`search` to narrow the list, `order_by` to sort it, and `fields` to reduce each result\nto only the properties you need.\nUse `lookup` to find complete application names mentioned in a rule sentence,\nignoring case. Lookup does not correct misspellings. It ranks matches by\nrelevance and uses the same filters, fields, and pagination as listing.\n`lookup` cannot be combined with `search`.\n\nInvalid UTF-8 or a NUL character (U+0000) in any query parameter name or value\nreturns `400`.\n\nThe authenticated principal must have access to the account identified by\n`account_id`.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account ID.", + "type": "string" + }, + "cursor": { + "description": "Opaque value from `result_info.cursor` of the previous response. Returns the\nresults that follow it. Send the same `filter`, `search`, `lookup`, and\n`order_by` values as the request that returned it; `limit` and `fields` may\nchange. An empty value is the same as no cursor. A modified cursor, or one used\nwith different values, returns `400`.\n", + "type": "string" + }, + "fields": { + "description": "Return only the listed properties on each application, as a comma-separated list.\nUse this to keep responses small when you only need part of each application, for\nexample populating a picker with `fields=id,name` instead of downloading every\nhostname and IP subnet.\n\nOmit this parameter to receive the full application object, including\nwhen lookup is used.\n\n`id` is always returned.\n\nSelectable properties: `id`, `name`, `human_id`, `version`, `hostnames`,\n`support_domains`, `ip_subnets`, `port_protocols`, `supported`, `gen_ai_score`,\n`application_confidence_score`, `created_at`, `updated_at`, `review_status`.\n\nUnknown or empty property names return `400`.\n", + "type": "string" + }, + "filter": { + "description": "Filter applications using `key:value` format. Supported filter keys:\n- `name`: application name (for example, `name:HR`).\n- `id`: application ID (for example, `id:498`).\n- `human_id`: human-readable ID (for example, `human_id:HR`).\n- `hostname`: hostname or support domain (for example, `hostname:portal.example.com`).\n- `source`: application source name (for example, `source:cloudflare`).\n- `ip_subnet`: CIDR containment; returns applications where a stored subnet contains the search value (for example, `ip_subnet:10.0.1.5/32` matches `10.0.0.0/16`).\n- `category_id`: category ID (for example, `category_id:12`).\n- `category_name`: category name (for example, `category_name:HR`).\n- `supported`: supported Cloudflare product. Values: `GATEWAY`, `ACCESS`, `CASB`.\n- `review_status`: account-specific Gateway review status. Values: `approved`, `unapproved`, `in_review`, `unreviewed`.\n", + "type": "string" + }, + "limit": { + "default": 25, + "description": "Number of results to return. Defaults to 25; values are clamped to 1–250.", + "type": "integer" + }, + "lookup": { + "description": "Find complete, case-insensitive application name mentions in a phrase or\nrule sentence. Misspelled names do not match. Returns matching applications\nranked by relevance. Must be between 2 and 1000 characters, with no control\ncharacters other than tab and line breaks. Uses the same\nfilters, fields, and pagination as listing. `search` cannot be combined\nwith lookup. Results are ranked by relevance, so `order_by` is ignored.\nTo keep the text out of URLs, send it to `POST .../applications/lookup` instead.\n", + "type": "string" + }, + "offset": { + "default": 0, + "description": "Number of results to skip. Defaults to 0; negative values are clamped to 0. Ignored when `cursor` is provided.", + "type": "integer" + }, + "order_by": { + "description": "Order results using field:direction format. Supported fields are name, id, human_id,\ncategory_id, application_type, application_confidence_score, and gen_ai_score.\nSupported directions are asc and desc. Ignored when search is provided; results are\nranked by relevance instead. Also ignored when lookup is provided.\n", + "type": "string" + }, + "search": { + "description": "Fuzzy search across application name and hostnames. Results are ranked by relevance. Must be between 2 and 200 characters. Can be combined with filter parameters.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List applications" + }, + method: "GET", + path: "/accounts/{account_id}/resource-library/applications", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/resource-library/applications`, + query: [ + ["filter", args["filter"], true], + ["limit", args["limit"], true], + ["offset", args["offset"], true], + ["cursor", args["cursor"], true], + ["order_by", args["order_by"], true], + ["search", args["search"], true], + ["lookup", args["lookup"], true], + ["fields", args["fields"], true], + ], + }), + }, + { + name: "accounts_applications_lookup", + title: "Look up applications in a rule sentence", + description: "Find complete application names mentioned in a rule sentence, ignoring case.\nLookup does not correct misspellings. Matches are ranked by relevance.\n\nThis endpoint takes the rule sentence in the request body, so the text stays out\nof URLs and request logs. Use it instead of the `lookup` query parameter on the\nlist endpoint when the text may contain sensitive content.\n\n`fields`, `limit`, and `filter` work the same way as on the list endpoint and are\npassed as query parameters. Results are not paged: `offset`, `cursor`, `order_by`,\n`search`, and `lookup` query parameters return `400`. Unknown request body properties also\nreturn `400`. Invalid UTF-8 or a NUL character (U+0000) in any query parameter\nname or value returns `400`.\n\nThe authenticated principal must have access to the account identified by\n`account_id`.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account ID.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/alexandria_lookup_applications_request" + }, + "fields": { + "description": "Return only the listed properties on each application, as a comma-separated list.\nAccepts the same properties as the list endpoint. `id` is always returned.\nOmit this parameter to receive the full application object.\n", + "type": "string" + }, + "filter": { + "description": "Filter matches using the same `key:value` filters as the list endpoint.", + "type": "string" + }, + "limit": { + "default": 25, + "description": "Maximum number of matches to return. Defaults to 25; values are clamped to 1–250.", + "type": "integer" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "alexandria_lookup_applications_request": alexandria_lookup_applications_request, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Look up applications in a rule sentence" + }, + method: "POST", + path: "/accounts/{account_id}/resource-library/applications/lookup", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/resource-library/applications/lookup`, + query: [ + ["filter", args["filter"], true], + ["limit", args["limit"], true], + ["fields", args["fields"], true], + ], + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_applications_update", + title: "Update application", + description: "Replace the supplied network matchers for a custom application and create a new version. Omitted matcher lists remain unchanged; send an empty list to clear a matcher type.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account ID.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/alexandria_update_application_request" + }, + "id": { + "description": "Application ID.", + "type": "string" + } + }, + required: [ + "account_id", + "id", + "body" + ], + $defs: { + "alexandria_application_hostnames": alexandria_application_hostnames, + "alexandria_application_ip_subnets": alexandria_application_ip_subnets, + "alexandria_application_port_protocols": alexandria_application_port_protocols, + "alexandria_application_support_domains": alexandria_application_support_domains, + "alexandria_update_application_request": alexandria_update_application_request, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update application" + }, + method: "PATCH", + path: "/accounts/{account_id}/resource-library/applications/{id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/resource-library/applications/${pathParam(args, "id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/billing/history/tools.ts b/src/generated/forge-mcp/accounts/billing/history/tools.ts new file mode 100644 index 00000000..9b23410a --- /dev/null +++ b/src/generated/forge-mcp/accounts/billing/history/tools.ts @@ -0,0 +1,80 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `accounts.billing.history`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_billing_history_list", + title: "Get Account Billing History", + description: "Gets the billing history for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Number of items per page.", + "type": "integer" + }, + "status": { + "description": "Filter billing history by status.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Account Billing History" + }, + method: "GET", + path: "/accounts/{account_id}/billing/history", + extensions: { + "x-api-token-group": [ + "Billing Write", + "Billing Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read" + ], + "x-fern-enum": { + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billing/history`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["status", args["status"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/billing/paymentMethods/schemas.ts b/src/generated/forge-mcp/accounts/billing/paymentMethods/schemas.ts new file mode 100644 index 00000000..9f83cd61 --- /dev/null +++ b/src/generated/forge-mcp/accounts/billing/paymentMethods/schemas.ts @@ -0,0 +1,109 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../_/tool.js"; + +/** + * The schema of `bill-subs-api_payment_method`. + */ +export const bill_subs_api_payment_method: JsonSchema = { + "properties": { + "address": { + "description": "Billing address line 1.", + "type": "string" + }, + "address2": { + "description": "Billing address line 2.", + "type": "string" + }, + "bank_account_type": { + "description": "Bank account type.", + "type": "string" + }, + "bank_code": { + "description": "Bank code.", + "type": "string" + }, + "bank_country": { + "description": "Bank country.", + "type": "string" + }, + "bank_name": { + "description": "Bank name for bank-based payment methods.", + "type": "string" + }, + "bank_routing_number": { + "description": "Bank routing number.", + "type": "string" + }, + "cashapp_cash_tag": { + "description": "Cash App cash tag.", + "type": "string" + }, + "city": { + "description": "Billing city.", + "type": "string" + }, + "country": { + "description": "Billing country.", + "type": "string" + }, + "default": { + "description": "Whether this is the default payment method.", + "type": "boolean" + }, + "device_data": { + "description": "Device data for fraud prevention.", + "type": "string" + }, + "first_name": { + "description": "Billing first name.", + "type": "string" + }, + "last_name": { + "description": "Billing last name.", + "type": "string" + }, + "nick_name": { + "description": "A nickname for the payment method.", + "type": "string" + }, + "payment_account_email": { + "description": "Email associated with the payment account.", + "type": "string" + }, + "payment_email": { + "description": "Payment email address.", + "type": "string" + }, + "payment_gateway": { + "description": "The payment gateway used.", + "type": "string" + }, + "payment_nonce": { + "description": "Payment nonce for tokenized payments.", + "type": "string" + }, + "state": { + "description": "Billing state.", + "type": "string" + }, + "type": { + "description": "The payment method type.", + "enum": [ + "CREDIT_CARD", + "PAYPAL", + "CASHAPP", + "SEPA_DEBIT", + "LINK", + "ACH_DIRECT_DEBIT" + ], + "type": "string" + }, + "zipcode": { + "description": "Billing zip code.", + "type": "string" + } + }, + "type": "object" +}; diff --git a/src/generated/forge-mcp/accounts/billing/paymentMethods/tools.ts b/src/generated/forge-mcp/accounts/billing/paymentMethods/tools.ts new file mode 100644 index 00000000..f8dcaea8 --- /dev/null +++ b/src/generated/forge-mcp/accounts/billing/paymentMethods/tools.ts @@ -0,0 +1,375 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { bill_subs_api_payment_method } from "./schemas.js"; + +/** + * The tools of `accounts.billing.payment_methods`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_billing_payment_methods_create", + title: "Create Payment Method", + description: "Creates a new payment method for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "body": { + "$ref": "#/$defs/bill-subs-api_payment_method" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "bill-subs-api_payment_method": bill_subs_api_payment_method, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create Payment Method" + }, + method: "POST", + path: "/accounts/{account_id}/payment-methods", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read", + "#billing:edit" + ], + "x-fern-enum": { + "#billing:edit": { + "name": "billing_edit" + }, + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/payment-methods`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_billing_payment_methods_delete", + title: "Delete Payment Method", + description: "Deletes a payment method from an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "payment_method_id": { + "description": "Payment method identifier.", + "type": "string" + } + }, + required: [ + "account_id", + "payment_method_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Payment Method" + }, + method: "DELETE", + path: "/accounts/{account_id}/payment-methods/{payment_method_id}", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:edit" + ], + "x-fern-enum": { + "#billing:edit": { + "name": "billing_edit" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/payment-methods/${pathParam(args, "payment_method_id")}`, + }), + }, + { + name: "accounts_billing_payment_methods_get", + title: "Get Payment Method", + description: "Gets a specific payment method for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "payment_method_id": { + "description": "Payment method identifier.", + "type": "string" + } + }, + required: [ + "account_id", + "payment_method_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Payment Method" + }, + method: "GET", + path: "/accounts/{account_id}/payment-methods/{payment_method_id}", + extensions: { + "x-api-token-group": [ + "Billing Write", + "Billing Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read" + ], + "x-fern-enum": { + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/payment-methods/${pathParam(args, "payment_method_id")}`, + }), + }, + { + name: "accounts_billing_payment_methods_list", + title: "List Payment Methods", + description: "Lists all payment methods for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Number of items per page.", + "type": "integer" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Payment Methods" + }, + method: "GET", + path: "/accounts/{account_id}/payment-methods", + extensions: { + "x-api-token-group": [ + "Billing Write", + "Billing Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read" + ], + "x-fern-enum": { + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/payment-methods`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, + { + name: "accounts_billing_payment_methods_set_default", + title: "Set Default Payment Method", + description: "Sets a payment method as the default for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "payment_method_id": { + "description": "Payment method identifier.", + "type": "string" + } + }, + required: [ + "account_id", + "payment_method_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Set Default Payment Method" + }, + method: "POST", + path: "/accounts/{account_id}/payment-methods/{payment_method_id}/set-as-default", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read", + "#billing:edit" + ], + "x-fern-enum": { + "#billing:edit": { + "name": "billing_edit" + }, + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/payment-methods/${pathParam(args, "payment_method_id")}/set-as-default`, + }), + }, + { + name: "accounts_billing_payment_methods_update", + title: "Update Payment Method", + description: "Updates a payment method for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "body": { + "$ref": "#/$defs/bill-subs-api_payment_method" + }, + "payment_method_id": { + "description": "Payment method identifier.", + "type": "string" + } + }, + required: [ + "account_id", + "payment_method_id", + "body" + ], + $defs: { + "bill-subs-api_payment_method": bill_subs_api_payment_method, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update Payment Method" + }, + method: "PUT", + path: "/accounts/{account_id}/payment-methods/{payment_method_id}", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read", + "#billing:edit" + ], + "x-fern-enum": { + "#billing:edit": { + "name": "billing_edit" + }, + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/payment-methods/${pathParam(args, "payment_method_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/billing/tools.ts b/src/generated/forge-mcp/accounts/billing/tools.ts new file mode 100644 index 00000000..24e4f0ad --- /dev/null +++ b/src/generated/forge-mcp/accounts/billing/tools.ts @@ -0,0 +1,376 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `accounts.billing`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_billing_create_setup_intent", + title: "Create Setup Intent", + description: "Creates a Stripe setup intent for adding a payment method to an account. Returns a client secret for frontend payment method collection.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create Setup Intent" + }, + method: "POST", + path: "/accounts/{account_id}/client-secret", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/client-secret`, + }), + }, + { + name: "accounts_billing_get_bad_debt", + title: "Get Account Bad Debt", + description: "Gets bad debt information for an account, including outstanding invoices and total debt amount.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Account Bad Debt" + }, + method: "GET", + path: "/accounts/{account_id}/billing/bad-debt", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billing/bad-debt`, + }), + }, + { + name: "accounts_billing_get_credits", + title: "Get Account Credits", + description: "Gets the credit balance and eligibility for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Account Credits" + }, + method: "GET", + path: "/accounts/{account_id}/billing/credits", + extensions: { + "x-api-token-group": [ + "Billing Write", + "Billing Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read" + ], + "x-fern-enum": { + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billing/credits`, + }), + }, + { + name: "accounts_billing_get_receipt_pdf", + title: "Get Receipt PDF", + description: "Downloads a receipt as a PDF document.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "doctype": { + "description": "The document type to generate.", + "type": "string" + }, + "receipt_id": { + "description": "Receipt identifier.", + "type": "string" + } + }, + required: [ + "account_id", + "receipt_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Receipt PDF" + }, + method: "GET", + path: "/accounts/{account_id}/receipts/{receipt_id}/pdf", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/receipts/${pathParam(args, "receipt_id")}/pdf`, + query: [ + ["doctype", args["doctype"], true], + ], + }), + }, + { + name: "accounts_billing_get_unpaid_invoices", + title: "Get Unpaid Invoices", + description: "Gets unpaid invoice information for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Unpaid Invoices" + }, + method: "GET", + path: "/accounts/{account_id}/billing/unpaid-invoice", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billing/unpaid-invoice`, + }), + }, + { + name: "accounts_billing_pay_bad_debt", + title: "Pay Bad Debt", + description: "Pays outstanding bad debt for an account. Discovers all debt automatically and handles invoice deduplication.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "body": { + "properties": { + "payment_method_id": { + "description": "The payment method to use. If omitted, the default payment method is used.", + "type": "string" + } + }, + "type": "object" + } + }, + required: [ + "account_id", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Pay Bad Debt" + }, + method: "POST", + path: "/accounts/{account_id}/pay-bad-debt", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/pay-bad-debt`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_billing_pay_invoice", + title: "Pay Invoice", + description: "Pays an outstanding invoice for an account. Returns a Stripe client secret when Strong Customer Authentication (SCA) is required to complete the payment.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "body": { + "properties": { + "invoice_id": { + "description": "The identifier of the invoice to pay.", + "type": "string" + }, + "payment_method_id": { + "description": "The payment method to use. If omitted, the default payment method is used.", + "type": "string" + }, + "validate_payment_method": { + "description": "Whether to validate the payment method before processing.", + "type": "boolean" + } + }, + "type": "object" + } + }, + required: [ + "account_id", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Pay Invoice" + }, + method: "POST", + path: "/accounts/{account_id}/pay-invoice", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/pay-invoice`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_billing_toggle_pdf_invoices", + title: "Toggle PDF Invoices", + description: "Toggles PDF invoice generation for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "body": { + "properties": { + "toggle": { + "description": "Whether to enable or disable PDF invoice generation.", + "type": "boolean" + } + }, + "type": "object" + } + }, + required: [ + "account_id", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Toggle PDF Invoices" + }, + method: "PATCH", + path: "/accounts/{account_id}/invoices", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/invoices`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/categories/tools.ts b/src/generated/forge-mcp/accounts/categories/tools.ts new file mode 100644 index 00000000..fb0e367b --- /dev/null +++ b/src/generated/forge-mcp/accounts/categories/tools.ts @@ -0,0 +1,92 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `accounts.categories`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_categories_get", + title: "Get application category", + description: "Retrieve an application category by its numeric ID.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account ID.", + "type": "string" + }, + "id": { + "description": "Application category ID.", + "type": "string" + } + }, + required: [ + "account_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get application category" + }, + method: "GET", + path: "/accounts/{account_id}/resource-library/categories/{id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/resource-library/categories/${pathParam(args, "id")}`, + }), + }, + { + name: "accounts_categories_list", + title: "List application categories", + description: "List the categories available for classifying applications, ordered by name.\nResults are paginated by `offset` or `cursor`.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account ID.", + "type": "string" + }, + "cursor": { + "description": "Opaque value from `result_info.cursor` of the previous response. Returns the\ncategories that follow it. `limit` may change between requests. An empty value\nis the same as no cursor. A modified cursor, or one returned by a different list,\nreturns `400`.\n", + "type": "string" + }, + "limit": { + "default": 25, + "description": "Number of results to return. Defaults to 25; values are clamped to 1–250.", + "type": "integer" + }, + "offset": { + "default": 0, + "description": "Number of results to skip. Defaults to 0; negative values are clamped to 0. Ignored when `cursor` is provided.", + "type": "integer" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List application categories" + }, + method: "GET", + path: "/accounts/{account_id}/resource-library/categories", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/resource-library/categories`, + query: [ + ["limit", args["limit"], true], + ["offset", args["offset"], true], + ["cursor", args["cursor"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/logs/audit/tools.ts b/src/generated/forge-mcp/accounts/logs/audit/tools.ts new file mode 100644 index 00000000..e7cdbf77 --- /dev/null +++ b/src/generated/forge-mcp/accounts/logs/audit/tools.ts @@ -0,0 +1,642 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `accounts.logs.audit`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_logs_audit_history", + title: "Get resource change history from an account audit log entry (Version 2)", + description: "Returns the chronological change history for the resource identified by the given audit log entry.\n\nThe endpoint first locates the source audit log entry by `id` (using `action_time` to narrow the lookup window), derives identifying filters from that entry, and then returns matching audit logs within the `since`/`before` window.\n\nThe `result_info.history_status` field indicates the quality of the resource identification used:\n- `exact`: Resource was identified by the resource URI.\n- `approximate`: Resource was identified without the resource URI.\n- `unavailable`: The source audit log entry did not contain enough information to identify the resource; an empty result is returned.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The unique ID that identifies the account.", + "type": "string" + }, + "action_time": { + "description": "RFC3339 timestamp of the source audit log entry's action time. Used to narrow the source-entry lookup window. Provide the `action.time` value from the audit log identified by `id`.", + "format": "date-time", + "type": "string" + }, + "before": { + "description": "Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.", + "format": "date", + "type": "string" + }, + "cursor": { + "description": "The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.", + "type": "string" + }, + "direction": { + "default": "desc", + "description": "Sets sorting order.", + "enum": [ + "desc", + "asc" + ], + "type": "string" + }, + "id": { + "description": "The ID of the audit log to fetch resource history for.", + "format": "uuid", + "type": "string" + }, + "limit": { + "default": 100, + "description": "The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.", + "type": "number" + }, + "since": { + "description": "Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.", + "format": "date", + "type": "string" + } + }, + required: [ + "account_id", + "id", + "action_time", + "since", + "before" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get resource change history from an account audit log entry (Version 2)" + }, + method: "GET", + path: "/accounts/{account_id}/logs/audit/{id}/history", + extensions: { + "x-api-token-group": [ + "Account Settings Write", + "Account Settings Read" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/logs/audit/${pathParam(args, "id")}/history`, + query: [ + ["action_time", args["action_time"], true], + ["since", args["since"], true], + ["before", args["before"], true], + ["direction", args["direction"], true], + ["limit", args["limit"], true], + ["cursor", args["cursor"], true], + ], + }), + }, + { + name: "accounts_logs_audit_list", + title: "Get account audit logs (Version 2)", + description: "Gets a list of audit logs for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The unique id that identifies the account.", + "type": "string" + }, + "account_name": { + "description": "Filters by the account name.", + "items": { + "type": "string" + }, + "type": "array" + }, + "account_name_not": { + "description": "Filters out audit logs by the account name.", + "items": { + "type": "string" + }, + "type": "array" + }, + "action_result": { + "description": "Filters by whether the action was successful or not.", + "items": { + "enum": [ + "success", + "failure" + ], + "type": "string" + }, + "type": "array" + }, + "action_result_not": { + "description": "Filters out audit logs by whether the action was successful or not.", + "items": { + "enum": [ + "success", + "failure" + ], + "type": "string" + }, + "type": "array" + }, + "action_type": { + "description": "Filters by the action type.", + "items": { + "enum": [ + "create", + "delete", + "view", + "update" + ], + "type": "string" + }, + "type": "array" + }, + "action_type_not": { + "description": "Filters out audit logs by the action type.", + "items": { + "enum": [ + "create", + "delete", + "view", + "update" + ], + "type": "string" + }, + "type": "array" + }, + "actor_context": { + "description": "Filters by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key.\n", + "items": { + "enum": [ + "api", + "api_key", + "api_token", + "dash", + "oauth", + "origin_ca_key" + ], + "type": "string" + }, + "type": "array" + }, + "actor_context_not": { + "description": "Filters out audit logs by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key.\n", + "items": { + "enum": [ + "api", + "api_key", + "api_token", + "dash", + "oauth", + "origin_ca_key" + ], + "type": "string" + }, + "type": "array" + }, + "actor_email": { + "description": "Filters by the actor's email address.", + "items": { + "type": "string" + }, + "type": "array" + }, + "actor_email_not": { + "description": "Filters out audit logs by the actor's email address.", + "items": { + "type": "string" + }, + "type": "array" + }, + "actor_id": { + "description": "Filters by the actor ID. This can be either the Account ID or User ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "actor_id_not": { + "description": "Filters out audit logs by the actor ID. This can be either the Account ID or User ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "actor_ip_address": { + "description": "The IP address where the action was initiated.", + "items": { + "type": "string" + }, + "type": "array" + }, + "actor_ip_address_not": { + "description": "Filters out audit logs IP address where the action was initiated.", + "items": { + "type": "string" + }, + "type": "array" + }, + "actor_token_id": { + "description": "Filters by the API token ID when the actor context is an api_token or oauth.", + "items": { + "type": "string" + }, + "type": "array" + }, + "actor_token_id_not": { + "description": "Filters out audit logs by the API token ID when the actor context is an api_token or oauth.", + "items": { + "type": "string" + }, + "type": "array" + }, + "actor_token_name": { + "description": "Filters by the API token name when the actor context is an api_token or oauth.", + "items": { + "type": "string" + }, + "type": "array" + }, + "actor_token_name_not": { + "description": "Filters out audit logs by the API token name when the actor context is an api_token or oauth.", + "items": { + "type": "string" + }, + "type": "array" + }, + "actor_type": { + "description": "Filters by the actor type.", + "items": { + "enum": [ + "account", + "cloudflare_admin", + "delegated_service", + "system", + "user" + ], + "type": "string" + }, + "type": "array" + }, + "actor_type_not": { + "description": "Filters out audit logs by the actor type.", + "items": { + "enum": [ + "account", + "cloudflare_admin", + "delegated_service", + "system", + "user" + ], + "type": "string" + }, + "type": "array" + }, + "audit_log_id": { + "description": "Finds a specific log by its ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "audit_log_id_not": { + "description": "Filters out audit logs by their IDs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "before": { + "description": "Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.", + "format": "date", + "type": "string" + }, + "cursor": { + "description": "The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.", + "type": "string" + }, + "direction": { + "default": "desc", + "description": "Sets sorting order.", + "enum": [ + "desc", + "asc" + ], + "type": "string" + }, + "id": { + "description": "Finds a specific log by its ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "id_not": { + "description": "Filters out audit logs by their IDs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "limit": { + "default": 100, + "description": "The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.", + "type": "number" + }, + "product_category": { + "description": "Filters audit logs by one or more predefined product categories. Each product category expands into a curated set of resource_product values and is unioned with any explicit resource_product filter. Matched case-insensitively; unknown product categories return 400. Repeatable. Use the audit log product categories endpoint to discover the available values.", + "items": { + "type": "string" + }, + "type": "array" + }, + "raw_cf_ray_id": { + "description": "Filters by the response CF Ray ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "raw_cf_ray_id_not": { + "description": "Filters out audit logs by the response CF Ray ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "raw_method": { + "description": "The HTTP method for the API call.", + "items": { + "type": "string" + }, + "type": "array" + }, + "raw_method_not": { + "description": "Filters out audit logs by the HTTP method for the API call.", + "items": { + "type": "string" + }, + "type": "array" + }, + "raw_status_code": { + "description": "The response status code that was returned.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "raw_status_code_not": { + "description": "Filters out audit logs by the response status code that was returned.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "raw_uri": { + "description": "Filters by the request URI.", + "items": { + "type": "string" + }, + "type": "array" + }, + "raw_uri_not": { + "description": "Filters out audit logs by the request URI.", + "items": { + "type": "string" + }, + "type": "array" + }, + "resource_id": { + "description": "Filters by the resource ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "resource_id_not": { + "description": "Filters out audit logs by the resource ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "resource_product": { + "description": "Filters audit logs by the Cloudflare product associated with the changed resource.", + "items": { + "type": "string" + }, + "type": "array" + }, + "resource_product_not": { + "description": "Filters out audit logs by the Cloudflare product associated with the changed resource.", + "items": { + "type": "string" + }, + "type": "array" + }, + "resource_scope": { + "description": "Filters by the resource scope, specifying whether the resource is associated with an user, an account, a zone, or a membership.", + "items": { + "enum": [ + "accounts", + "user", + "zones", + "memberships" + ], + "type": "string" + }, + "type": "array" + }, + "resource_scope_not": { + "description": "Filters out audit logs by the resource scope, specifying whether the resource is associated with an user, an account, a zone, or a membership.", + "items": { + "enum": [ + "accounts", + "user", + "zones", + "memberships" + ], + "type": "string" + }, + "type": "array" + }, + "resource_type": { + "description": "Filters audit logs based on the unique type of resource changed by the action.", + "items": { + "type": "string" + }, + "type": "array" + }, + "resource_type_not": { + "description": "Filters out audit logs based on the unique type of resource changed by the action.", + "items": { + "type": "string" + }, + "type": "array" + }, + "since": { + "description": "Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.", + "format": "date", + "type": "string" + }, + "zone_id": { + "description": "Filters by the zone ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "zone_id_not": { + "description": "Filters out audit logs by the zone ID.", + "items": { + "type": "string" + }, + "type": "array" + }, + "zone_name": { + "description": "Filters by the zone name associated with the change.", + "items": { + "type": "string" + }, + "type": "array" + }, + "zone_name_not": { + "description": "Filters out audit logs by the zone name associated with the change.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + required: [ + "account_id", + "since", + "before" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get account audit logs (Version 2)" + }, + method: "GET", + path: "/accounts/{account_id}/logs/audit", + extensions: { + "x-api-token-group": [ + "Account Settings Write", + "Account Settings Read" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/logs/audit`, + query: [ + ["account_name", args["account_name"], true], + ["action_result", args["action_result"], true], + ["action_type", args["action_type"], true], + ["actor_context", args["actor_context"], true], + ["actor_email", args["actor_email"], true], + ["actor_id", args["actor_id"], true], + ["actor_ip_address", args["actor_ip_address"], true], + ["actor_token_id", args["actor_token_id"], true], + ["actor_token_name", args["actor_token_name"], true], + ["actor_type", args["actor_type"], true], + ["audit_log_id", args["audit_log_id"], true], + ["id", args["id"], true], + ["raw_cf_ray_id", args["raw_cf_ray_id"], true], + ["raw_method", args["raw_method"], true], + ["raw_status_code", args["raw_status_code"], true], + ["raw_uri", args["raw_uri"], true], + ["resource_id", args["resource_id"], true], + ["resource_product", args["resource_product"], true], + ["resource_type", args["resource_type"], true], + ["resource_scope", args["resource_scope"], true], + ["product_category", args["product_category"], true], + ["zone_id", args["zone_id"], true], + ["zone_name", args["zone_name"], true], + ["account_name.not", args["account_name_not"], true], + ["action_result.not", args["action_result_not"], true], + ["action_type.not", args["action_type_not"], true], + ["actor_context.not", args["actor_context_not"], true], + ["actor_email.not", args["actor_email_not"], true], + ["actor_id.not", args["actor_id_not"], true], + ["actor_ip_address.not", args["actor_ip_address_not"], true], + ["actor_token_id.not", args["actor_token_id_not"], true], + ["actor_token_name.not", args["actor_token_name_not"], true], + ["actor_type.not", args["actor_type_not"], true], + ["audit_log_id.not", args["audit_log_id_not"], true], + ["id.not", args["id_not"], true], + ["raw_cf_ray_id.not", args["raw_cf_ray_id_not"], true], + ["raw_method.not", args["raw_method_not"], true], + ["raw_status_code.not", args["raw_status_code_not"], true], + ["raw_uri.not", args["raw_uri_not"], true], + ["resource_id.not", args["resource_id_not"], true], + ["resource_product.not", args["resource_product_not"], true], + ["resource_type.not", args["resource_type_not"], true], + ["resource_scope.not", args["resource_scope_not"], true], + ["zone_id.not", args["zone_id_not"], true], + ["zone_name.not", args["zone_name_not"], true], + ["since", args["since"], true], + ["before", args["before"], true], + ["direction", args["direction"], true], + ["limit", args["limit"], true], + ["cursor", args["cursor"], true], + ], + }), + }, + { + name: "accounts_logs_audit_product_categories", + title: "List account audit log product categories (Version 2)", + description: "Lists the available audit log product categories and the resource products each one expands to. Use these values with the product_category filter on the account audit logs endpoint.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The unique id that identifies the account.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List account audit log product categories (Version 2)" + }, + method: "GET", + path: "/accounts/{account_id}/logs/audit/product_categories", + extensions: { + "x-api-token-group": [ + "Account Settings Write", + "Account Settings Read" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/logs/audit/product_categories`, + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/members/schemas.ts b/src/generated/forge-mcp/accounts/members/schemas.ts new file mode 100644 index 00000000..45a12b4e --- /dev/null +++ b/src/generated/forge-mcp/accounts/members/schemas.ts @@ -0,0 +1,194 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `iam_create-member-with-policies`. + */ +export const iam_create_member_with_policies: JsonSchema = { + "description": "Add Member with Policies", + "properties": { + "email": { + "$ref": "#/$defs/iam_email", + "description": "The contact email address of the user." + }, + "policies": { + "description": "Array of policies associated with this member.", + "items": { + "$ref": "#/$defs/iam_create_member_policy" + }, + "type": "array" + }, + "status": { + "$ref": "#/$defs/iam_member-invitation-status", + "description": "Status of the member invitation. If not provided during creation, defaults to 'pending'.\nChanging from 'accepted' back to 'pending' will trigger a replacement of the member resource in Terraform.\n" + } + }, + "required": [ + "email", + "policies" + ], + "type": "object" +}; + +/** + * The schema of `iam_create-member-with-roles`. + */ +export const iam_create_member_with_roles: JsonSchema = { + "description": "Add Member with Account Roles", + "properties": { + "email": { + "$ref": "#/$defs/iam_email", + "description": "The contact email address of the user." + }, + "roles": { + "description": "Array of roles associated with this member.", + "items": { + "$ref": "#/$defs/iam_role_components-schemas-identifier" + }, + "type": "array" + }, + "status": { + "$ref": "#/$defs/iam_member-invitation-status", + "description": "Status of the member invitation. If not provided during creation, defaults to 'pending'.\nChanging from 'accepted' back to 'pending' will trigger a replacement of the member resource in Terraform.\n" + } + }, + "required": [ + "email", + "roles" + ], + "type": "object" +}; + +/** + * The schema of `iam_create_member_policy`. + */ +export const iam_create_member_policy: JsonSchema = { + "description": "create_member_policy", + "properties": { + "access": { + "$ref": "#/$defs/iam_access", + "description": "Allow or deny operations against the resources." + }, + "permission_groups": { + "$ref": "#/$defs/iam_member_permission_groups", + "description": "A set of permission groups that are specified to the policy." + }, + "resource_groups": { + "$ref": "#/$defs/iam_member_resource_groups", + "description": "A list of resource groups that the policy applies to." + } + }, + "required": [ + "access", + "permission_groups", + "resource_groups" + ], + "type": "object" +}; + +/** + * The schema of `iam_member-invitation-status`. + */ +export const iam_member_invitation_status: JsonSchema = { + "description": "Status of the member invitation. If not provided during creation, defaults to 'pending'.\nChanging from 'accepted' back to 'pending' will trigger a replacement of the member resource in Terraform.\n", + "enum": [ + "accepted", + "pending" + ], + "type": "string" +}; + +/** + * The schema of `iam_member_permission_group`. + */ +export const iam_member_permission_group: JsonSchema = { + "description": "A group of permissions.", + "properties": { + "id": { + "description": "Identifier of the group.", + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" +}; + +/** + * The schema of `iam_member_permission_groups`. + */ +export const iam_member_permission_groups: JsonSchema = { + "description": "A set of permission groups that are specified to the policy.", + "items": { + "$ref": "#/$defs/iam_member_permission_group" + }, + "type": "array" +}; + +/** + * The schema of `iam_member_resource_group`. + */ +export const iam_member_resource_group: JsonSchema = { + "description": "A group of scoped resources.", + "properties": { + "id": { + "description": "Identifier of the group.", + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" +}; + +/** + * The schema of `iam_member_resource_groups`. + */ +export const iam_member_resource_groups: JsonSchema = { + "description": "A list of resource groups that the policy applies to.", + "items": { + "$ref": "#/$defs/iam_member_resource_group" + }, + "type": "array" +}; + +/** + * The schema of `iam_update-member-with-policies`. + */ +export const iam_update_member_with_policies: JsonSchema = { + "description": "Update Member with Policies", + "properties": { + "policies": { + "description": "Array of policies associated with this member.", + "items": { + "$ref": "#/$defs/iam_create_member_policy" + }, + "type": "array" + } + }, + "required": [ + "policies" + ], + "type": "object" +}; + +/** + * The schema of `iam_update-member-with-roles`. + */ +export const iam_update_member_with_roles: JsonSchema = { + "description": "Update Member with Account Roles", + "properties": { + "roles": { + "description": "Roles assigned to this member.", + "items": { + "$ref": "#/$defs/iam_role" + }, + "type": "array" + } + }, + "type": "object" +}; diff --git a/src/generated/forge-mcp/accounts/members/tools.ts b/src/generated/forge-mcp/accounts/members/tools.ts new file mode 100644 index 00000000..55be25e5 --- /dev/null +++ b/src/generated/forge-mcp/accounts/members/tools.ts @@ -0,0 +1,399 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { + iam_access, + iam_email, + iam_grants, + iam_permissions, +} from "../../schemas.js"; +import { + iam_role, + iam_role_components_schemas_identifier, +} from "../schemas.js"; +import { + iam_create_member_policy, + iam_create_member_with_policies, + iam_create_member_with_roles, + iam_member_invitation_status, + iam_member_permission_group, + iam_member_permission_groups, + iam_member_resource_group, + iam_member_resource_groups, + iam_update_member_with_policies, + iam_update_member_with_roles, +} from "./schemas.js"; + +/** + * The tools of `accounts.members`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_members_create", + title: "Add Member", + description: "Add a user to the list of members for this account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + }, + "body": { + "oneOf": [ + { + "$ref": "#/$defs/iam_create-member-with-roles" + }, + { + "$ref": "#/$defs/iam_create-member-with-policies" + } + ] + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "iam_access": iam_access, + "iam_create-member-with-policies": iam_create_member_with_policies, + "iam_create-member-with-roles": iam_create_member_with_roles, + "iam_create_member_policy": iam_create_member_policy, + "iam_email": iam_email, + "iam_member-invitation-status": iam_member_invitation_status, + "iam_member_permission_group": iam_member_permission_group, + "iam_member_permission_groups": iam_member_permission_groups, + "iam_member_resource_group": iam_member_resource_group, + "iam_member_resource_groups": iam_member_resource_groups, + "iam_role_components-schemas-identifier": iam_role_components_schemas_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Add Member" + }, + method: "POST", + path: "/accounts/{account_id}/members", + extensions: { + "x-api-token-group": [ + "SCIM Provisioning", + "Account Settings Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#organization:edit" + ], + "x-fern-enum": { + "#organization:edit": { + "name": "organization_edit" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/members`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_members_delete", + title: "Remove Member", + description: "Remove a member from an account.\n\nConfirm with the user before calling this tool. Are you sure you want to remove this user from the account?", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + }, + "member_id": { + "description": "Membership identifier tag.", + "type": "string" + } + }, + required: [ + "account_id", + "member_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Remove Member" + }, + method: "DELETE", + path: "/accounts/{account_id}/members/{member_id}", + extensions: { + "x-api-token-group": [ + "SCIM Provisioning", + "Account Settings Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#organization:edit" + ], + "x-fern-enum": { + "#organization:edit": { + "name": "organization_edit" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/members/${pathParam(args, "member_id")}`, + }), + }, + { + name: "accounts_members_get", + title: "Member Details", + description: "Get information about a specific member of an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + }, + "member_id": { + "description": "Membership identifier tag.", + "type": "string" + } + }, + required: [ + "account_id", + "member_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Member Details" + }, + method: "GET", + path: "/accounts/{account_id}/members/{member_id}", + extensions: { + "x-api-token-group": [ + "SCIM Provisioning", + "Account Settings Write", + "Account Settings Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#organization:read" + ], + "x-fern-enum": { + "#organization:read": { + "name": "organization_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/members/${pathParam(args, "member_id")}`, + }), + }, + { + name: "accounts_members_list", + title: "List Members", + description: "List all members of an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + }, + "direction": { + "description": "Direction to order results.", + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "order": { + "description": "Field to order results by.", + "enum": [ + "user.first_name", + "user.last_name", + "user.email", + "status" + ], + "type": "string" + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "number" + }, + "per_page": { + "default": 20, + "description": "Maximum number of results per page.", + "type": "number" + }, + "status": { + "description": "A member's status in the account.", + "enum": [ + "accepted", + "pending", + "rejected" + ], + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Members" + }, + method: "GET", + path: "/accounts/{account_id}/members", + extensions: { + "x-api-token-group": [ + "SCIM Provisioning", + "Account Settings Write", + "Account Settings Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#organization:read" + ], + "x-fern-enum": { + "#organization:read": { + "name": "organization_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/members`, + query: [ + ["order", args["order"], true], + ["status", args["status"], true], + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["direction", args["direction"], true], + ], + }), + }, + { + name: "accounts_members_update", + title: "Update Member", + description: "Modify an account member.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + }, + "body": { + "oneOf": [ + { + "$ref": "#/$defs/iam_update-member-with-roles" + }, + { + "$ref": "#/$defs/iam_update-member-with-policies" + } + ] + }, + "member_id": { + "description": "Membership identifier tag.", + "type": "string" + } + }, + required: [ + "account_id", + "member_id", + "body" + ], + $defs: { + "iam_access": iam_access, + "iam_create_member_policy": iam_create_member_policy, + "iam_grants": iam_grants, + "iam_member_permission_group": iam_member_permission_group, + "iam_member_permission_groups": iam_member_permission_groups, + "iam_member_resource_group": iam_member_resource_group, + "iam_member_resource_groups": iam_member_resource_groups, + "iam_permissions": iam_permissions, + "iam_role": iam_role, + "iam_role_components-schemas-identifier": iam_role_components_schemas_identifier, + "iam_update-member-with-policies": iam_update_member_with_policies, + "iam_update-member-with-roles": iam_update_member_with_roles, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update Member" + }, + method: "PUT", + path: "/accounts/{account_id}/members/{member_id}", + extensions: { + "x-api-token-group": [ + "SCIM Provisioning", + "Account Settings Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#organization:edit" + ], + "x-fern-enum": { + "#organization:edit": { + "name": "organization_edit" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/members/${pathParam(args, "member_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/organization/tools.ts b/src/generated/forge-mcp/accounts/organization/tools.ts new file mode 100644 index 00000000..5d751bde --- /dev/null +++ b/src/generated/forge-mcp/accounts/organization/tools.ts @@ -0,0 +1,43 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `accounts.organization`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_organization_list", + title: "List account organizations", + description: "Retrieve a list of the organizations that \"contain\" this account or are\nmanaging it.\n\nThe returned list will be in order from \"root\" to \"leaf\", where the \"leaf\"\nwill be the organization that _immediately_ contains the specified\naccount.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List account organizations" + }, + method: "GET", + path: "/accounts/{account_id}/organizations", + extensions: { + "x-api-token-group": [ + "Account Settings Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/organizations`, + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/profile/tools.ts b/src/generated/forge-mcp/accounts/profile/tools.ts new file mode 100644 index 00000000..2b1c21c4 --- /dev/null +++ b/src/generated/forge-mcp/accounts/profile/tools.ts @@ -0,0 +1,87 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { organizations_api_Profile } from "../../schemas.js"; + +/** + * The tools of `accounts.profile`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_profile_get", + title: "Get account profile", + description: "Retrieves the business profile (name, email, phone, address, and external metadata)\nassociated with this account's parent organization customer record. Profiles can be shared\nacross accounts and organizations. Only available to members of an organization that\ncontains the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The ID of the account whose business profile to retrieve.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get account profile" + }, + method: "GET", + path: "/accounts/{account_id}/profile", + extensions: { + "x-api-token-group": [ + "Account Settings Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/profile`, + }), + }, + { + name: "accounts_profile_update", + title: "Update account profile", + description: "Updates the business profile (name, email, phone, address, and external metadata) associated\nwith this account's parent organization customer record. Changes apply to every account and\norganization sharing that profile. Omitted or empty fields are left unchanged. Only\navailable to members of an organization that contains the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The ID of the account whose business profile to update.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/organizations-api_Profile" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "organizations-api_Profile": organizations_api_Profile, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update account profile" + }, + method: "PUT", + path: "/accounts/{account_id}/profile", + extensions: { + "x-api-token-group": [ + "Account Settings Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/profile`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/schemas.ts b/src/generated/forge-mcp/accounts/schemas.ts new file mode 100644 index 00000000..efcf08ed --- /dev/null +++ b/src/generated/forge-mcp/accounts/schemas.ts @@ -0,0 +1,118 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../_/tool.js"; + +/** + * The schema of `alexandria_category_id`. + */ +export const alexandria_category_id: JsonSchema = { + "description": "Numeric identifier for an application category.", + "type": "integer" +}; + +/** + * The schema of `iam_account`. + */ +export const iam_account: JsonSchema = { + "properties": { + "id": { + "$ref": "#/$defs/iam_common_components-schemas-identifier", + "description": "Identifier" + }, + "managed_by": { + "$ref": "#/$defs/iam_account_managed_by", + "description": "Parent container details" + }, + "name": { + "description": "Account name", + "type": "string" + }, + "settings": { + "$ref": "#/$defs/iam_account_settings", + "description": "Account settings" + }, + "type": { + "$ref": "#/$defs/iam_account-type" + } + }, + "required": [ + "id", + "name", + "type" + ], + "type": "object" +}; + +/** + * The schema of `iam_create-account`. + */ +export const iam_create_account: JsonSchema = { + "description": "Create Account", + "properties": { + "name": { + "description": "Account name", + "type": "string" + }, + "standalone": { + "description": "Set to `true` and omit `unit` to create a standalone Free Account. If provided, this field must be `true`.", + "enum": [ + true + ], + "type": "boolean" + }, + "type": { + "$ref": "#/$defs/iam_account-type" + }, + "unit": { + "$ref": "#/$defs/iam_create-account_unit", + "description": "Information related to the tenant unit. Provide its ID and omit `standalone` to create the Account within an Organization. See https://developers.cloudflare.com/tenant/how-to/manage-accounts/." + } + }, + "required": [ + "name" + ], + "type": "object" +}; + +/** + * The schema of `iam_create-account_unit`. + */ +export const iam_create_account_unit: JsonSchema = { + "description": "Information related to the tenant unit. Provide its ID and omit `standalone` to create the Account within an Organization. See https://developers.cloudflare.com/tenant/how-to/manage-accounts/.", + "properties": { + "id": { + "description": "Tenant unit ID", + "type": "string" + } + }, + "type": "object" +}; + +/** + * The schema of `iam_role`. + */ +export const iam_role: JsonSchema = { + "properties": { + "id": { + "$ref": "#/$defs/iam_role_components-schemas-identifier", + "description": "Role identifier tag." + }, + "permissions": { + "$ref": "#/$defs/iam_permissions" + } + }, + "required": [ + "id", + "permissions" + ], + "type": "object" +}; + +/** + * The schema of `iam_role_components-schemas-identifier`. + */ +export const iam_role_components_schemas_identifier: JsonSchema = { + "description": "Role identifier tag.", + "type": "string" +}; diff --git a/src/generated/forge-mcp/accounts/subscriptions/schemas.ts b/src/generated/forge-mcp/accounts/subscriptions/schemas.ts new file mode 100644 index 00000000..a0ceb6fa --- /dev/null +++ b/src/generated/forge-mcp/accounts/subscriptions/schemas.ts @@ -0,0 +1,24 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `bill-subs-api_cancel_reason_request`. + */ +export const bill_subs_api_cancel_reason_request: JsonSchema = { + "properties": { + "other": { + "description": "Additional cancellation details.", + "type": "string" + }, + "reason_code": { + "description": "The cancellation reason codes.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" +}; diff --git a/src/generated/forge-mcp/accounts/subscriptions/tools.ts b/src/generated/forge-mcp/accounts/subscriptions/tools.ts new file mode 100644 index 00000000..2de02b2a --- /dev/null +++ b/src/generated/forge-mcp/accounts/subscriptions/tools.ts @@ -0,0 +1,497 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { + bill_subs_api_component_value, + bill_subs_api_component_values, + bill_subs_api_frequency, + bill_subs_api_install_id, + bill_subs_api_rate_plan, + bill_subs_api_subscription_v2, + bill_subs_api_subscription_v2_app, + bill_subs_api_zone, +} from "../../schemas.js"; +import { bill_subs_api_cancel_reason_request } from "./schemas.js"; + +/** + * The tools of `accounts.subscriptions`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_subscriptions_cancel_delayed_downgrade", + title: "Cancel Delayed Downgrade", + description: "Cancels pending delayed downgrades for the specified subscriptions.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "body": { + "properties": { + "subscription_ids": { + "description": "List of subscription identifiers to cancel downgrades for.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + }, + required: [ + "account_id", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Cancel Delayed Downgrade" + }, + method: "POST", + path: "/accounts/{account_id}/subscriptions/cancel-downgrade", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#subscription:edit" + ], + "x-fern-enum": { + "#subscription:edit": { + "name": "subscription_edit" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/subscriptions/cancel-downgrade`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_subscriptions_create", + title: "Create Subscription", + description: "Creates an account or zone subscription.", + inputSchema: { + type: "object", + properties: { + "account_or_zone": { + "type": "string" + }, + "account_or_zone_id": { + "description": "Identifier", + "type": "string" + }, + "body": { + "$ref": "#/$defs/bill-subs-api_subscription-v2" + } + }, + required: [ + "account_or_zone", + "account_or_zone_id", + "body" + ], + $defs: { + "bill-subs-api_component_value": bill_subs_api_component_value, + "bill-subs-api_component_values": bill_subs_api_component_values, + "bill-subs-api_frequency": bill_subs_api_frequency, + "bill-subs-api_install_id": bill_subs_api_install_id, + "bill-subs-api_rate_plan": bill_subs_api_rate_plan, + "bill-subs-api_subscription-v2": bill_subs_api_subscription_v2, + "bill-subs-api_subscription-v2_app": bill_subs_api_subscription_v2_app, + "bill-subs-api_zone": bill_subs_api_zone, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create Subscription" + }, + method: "POST", + path: "/{account_or_zone}/{account_or_zone_id}/subscriptions", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read", + "#billing:edit" + ], + "x-fern-enum": { + "#billing:edit": { + "name": "billing_edit" + }, + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/${pathParam(args, "account_or_zone")}/${pathParam(args, "account_or_zone_id")}/subscriptions`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_subscriptions_create_cancel_reason", + title: "Create Cancel Reason", + description: "Records a cancellation reason for an account subscription.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "body": { + "$ref": "#/$defs/bill-subs-api_cancel_reason_request" + }, + "subscription_identifier": { + "description": "Subscription identifier tag.", + "type": "string" + } + }, + required: [ + "account_id", + "subscription_identifier", + "body" + ], + $defs: { + "bill-subs-api_cancel_reason_request": bill_subs_api_cancel_reason_request, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create Cancel Reason" + }, + method: "POST", + path: "/accounts/{account_id}/subscriptions/{subscription_identifier}/cancel-reason", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#subscription:edit" + ], + "x-fern-enum": { + "#subscription:edit": { + "name": "subscription_edit" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/subscriptions/${pathParam(args, "subscription_identifier")}/cancel-reason`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_subscriptions_delete", + title: "Delete Subscription", + description: "Deletes an account's subscription.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "subscription_identifier": { + "description": "Subscription identifier tag.", + "type": "string" + } + }, + required: [ + "account_id", + "subscription_identifier" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Subscription" + }, + method: "DELETE", + path: "/accounts/{account_id}/subscriptions/{subscription_identifier}", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:edit" + ], + "x-fern-enum": { + "#billing:edit": { + "name": "billing_edit" + } + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/subscriptions/${pathParam(args, "subscription_identifier")}`, + }), + }, + { + name: "accounts_subscriptions_get", + title: "List Subscriptions", + description: "Lists all of an account or zone's subscriptions.", + inputSchema: { + type: "object", + properties: { + "account_or_zone": { + "type": "string" + }, + "account_or_zone_id": { + "description": "Identifier", + "type": "string" + } + }, + required: [ + "account_or_zone", + "account_or_zone_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Subscriptions" + }, + method: "GET", + path: "/{account_or_zone}/{account_or_zone_id}/subscriptions", + extensions: { + "x-api-token-group": [ + "Billing Write", + "Billing Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read" + ], + "x-fern-enum": { + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/${pathParam(args, "account_or_zone")}/${pathParam(args, "account_or_zone_id")}/subscriptions`, + }), + }, + { + name: "accounts_subscriptions_get_by_identifier", + title: "Get Subscription", + description: "Gets an account subscription by identifier.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "subscription_identifier": { + "description": "Subscription identifier tag.", + "type": "string" + } + }, + required: [ + "account_id", + "subscription_identifier" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Subscription" + }, + method: "GET", + path: "/accounts/{account_id}/subscriptions/{subscription_identifier}", + extensions: { + "x-api-token-group": [ + "Billing Write", + "Billing Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#subscription:read" + ], + "x-fern-enum": { + "#subscription:read": { + "name": "subscription_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/subscriptions/${pathParam(args, "subscription_identifier")}`, + }), + }, + { + name: "accounts_subscriptions_get_cancel_reason", + title: "Get Cancel Reason", + description: "Gets the cancellation reason for an account subscription.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "subscription_identifier": { + "description": "Subscription identifier tag.", + "type": "string" + } + }, + required: [ + "account_id", + "subscription_identifier" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Cancel Reason" + }, + method: "GET", + path: "/accounts/{account_id}/subscriptions/{subscription_identifier}/cancel-reason", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/subscriptions/${pathParam(args, "subscription_identifier")}/cancel-reason`, + }), + }, + { + name: "accounts_subscriptions_update", + title: "Update Subscription", + description: "Updates an account subscription.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "body": { + "$ref": "#/$defs/bill-subs-api_subscription-v2" + }, + "subscription_identifier": { + "description": "Subscription identifier tag.", + "type": "string" + } + }, + required: [ + "account_id", + "subscription_identifier", + "body" + ], + $defs: { + "bill-subs-api_component_value": bill_subs_api_component_value, + "bill-subs-api_component_values": bill_subs_api_component_values, + "bill-subs-api_frequency": bill_subs_api_frequency, + "bill-subs-api_install_id": bill_subs_api_install_id, + "bill-subs-api_rate_plan": bill_subs_api_rate_plan, + "bill-subs-api_subscription-v2": bill_subs_api_subscription_v2, + "bill-subs-api_subscription-v2_app": bill_subs_api_subscription_v2_app, + "bill-subs-api_zone": bill_subs_api_zone, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update Subscription" + }, + method: "PUT", + path: "/accounts/{account_id}/subscriptions/{subscription_identifier}", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read", + "#billing:edit" + ], + "x-fern-enum": { + "#billing:edit": { + "name": "billing_edit" + }, + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/subscriptions/${pathParam(args, "subscription_identifier")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/tokens/permissionGroups/tools.ts b/src/generated/forge-mcp/accounts/tokens/permissionGroups/tools.ts new file mode 100644 index 00000000..4d0f3e3d --- /dev/null +++ b/src/generated/forge-mcp/accounts/tokens/permissionGroups/tools.ts @@ -0,0 +1,73 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `accounts.tokens.permission_groups`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_tokens_permission_groups_list", + title: "List Permission Groups", + description: "Find all available permission groups for Account Owned API Tokens.\nEach permission group indicates whether the caller can select it when\ncreating a token. Token creation performs the authoritative permission\ncheck.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + }, + "name": { + "description": "Filter by the name of the permission group.\nThe value must be URL-encoded.", + "type": "string" + }, + "scope": { + "description": "Filter by the scope of the permission group.\nThe value must be URL-encoded.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Permission Groups" + }, + method: "GET", + path: "/accounts/{account_id}/tokens/permission_groups", + extensions: { + "x-api-token-group": [ + "Account API Tokens Write", + "Account API Tokens Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.token.read" + ], + "x-fern-enum": { + "com.cloudflare.api.account.token.read": { + "name": "com_cloudflare_api_account_token_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/tokens/permission_groups`, + query: [ + ["name", args["name"], true], + ["scope", args["scope"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/tokens/tools.ts b/src/generated/forge-mcp/accounts/tokens/tools.ts new file mode 100644 index 00000000..7c7f00d9 --- /dev/null +++ b/src/generated/forge-mcp/accounts/tokens/tools.ts @@ -0,0 +1,469 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { + iam_cidr_list, + iam_condition, + iam_create_payload, + iam_effect, + iam_expires_on, + iam_name, + iam_not_before, + iam_permission_group, + iam_permission_group_meta, + iam_permission_groups, + iam_policy_with_permission_groups_and_resources, + iam_request_ip, + iam_resources, + iam_resources_type_object_nested, + iam_resources_type_object_string, + iam_token_body, + iam_token_policies, + iam_token_status, +} from "../../schemas.js"; + +/** + * The tools of `accounts.tokens`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_tokens_create", + title: "Create Token", + description: "Create a new Account Owned API token.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/iam_create_payload" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "iam_cidr_list": iam_cidr_list, + "iam_condition": iam_condition, + "iam_create_payload": iam_create_payload, + "iam_effect": iam_effect, + "iam_expires_on": iam_expires_on, + "iam_name": iam_name, + "iam_not_before": iam_not_before, + "iam_permission_group": iam_permission_group, + "iam_permission_group_meta": iam_permission_group_meta, + "iam_permission_groups": iam_permission_groups, + "iam_policy_with_permission_groups_and_resources": iam_policy_with_permission_groups_and_resources, + "iam_request_ip": iam_request_ip, + "iam_resources": iam_resources, + "iam_resources_type_object_nested": iam_resources_type_object_nested, + "iam_resources_type_object_string": iam_resources_type_object_string, + "iam_token_policies": iam_token_policies, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create Token" + }, + method: "POST", + path: "/accounts/{account_id}/tokens", + extensions: { + "x-api-token-group": [ + "Account API Tokens Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.token.create" + ], + "x-fern-enum": { + "com.cloudflare.api.account.token.create": { + "name": "com_cloudflare_api_account_token_create" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/tokens`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_tokens_delete", + title: "Delete Token", + description: "Destroy an Account Owned API token.\n\nConfirm with the user before calling this tool. Are you sure? This action cannot be undone.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + }, + "token_id": { + "description": "Token identifier tag.", + "type": "string" + } + }, + required: [ + "account_id", + "token_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Token" + }, + method: "DELETE", + path: "/accounts/{account_id}/tokens/{token_id}", + extensions: { + "x-api-token-group": [ + "Account API Tokens Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.token.delete" + ], + "x-fern-enum": { + "com.cloudflare.api.account.token.delete": { + "name": "com_cloudflare_api_account_token_delete" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/tokens/${pathParam(args, "token_id")}`, + }), + }, + { + name: "accounts_tokens_get", + title: "Token Details", + description: "Get information about a specific Account Owned API token.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + }, + "token_id": { + "description": "Token identifier tag.", + "type": "string" + } + }, + required: [ + "account_id", + "token_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Token Details" + }, + method: "GET", + path: "/accounts/{account_id}/tokens/{token_id}", + extensions: { + "x-api-token-group": [ + "Account API Tokens Write", + "Account API Tokens Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.token.read" + ], + "x-fern-enum": { + "com.cloudflare.api.account.token.read": { + "name": "com_cloudflare_api_account_token_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/tokens/${pathParam(args, "token_id")}`, + }), + }, + { + name: "accounts_tokens_list", + title: "List Tokens", + description: "List Account Owned API tokens created for this account. Callers with\n`com.cloudflare.api.account.token.list_self` permission only receive\ntokens they created. Results include active, disabled, and\nrecently-expired tokens when `include_expired` is set to true.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + }, + "direction": { + "description": "Direction to order results.", + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "include_expired": { + "default": false, + "description": "When true, includes recently-expired tokens in the response.", + "type": "boolean" + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "number" + }, + "per_page": { + "default": 20, + "description": "Maximum number of results per page.", + "type": "number" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Tokens" + }, + method: "GET", + path: "/accounts/{account_id}/tokens", + extensions: { + "x-api-token-group": [ + "Account API Tokens Write", + "Account API Tokens Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.token.list", + "com.cloudflare.api.account.token.list_self" + ], + "x-fern-enum": { + "com.cloudflare.api.account.token.list": { + "name": "com_cloudflare_api_account_token_list" + }, + "com.cloudflare.api.account.token.list_self": { + "name": "com_cloudflare_api_account_token_list_self" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/tokens`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["direction", args["direction"], true], + ["include_expired", args["include_expired"], true], + ], + }), + }, + { + name: "accounts_tokens_roll", + title: "Roll Token", + description: "Roll the Account Owned API token secret.\n\nConfirm with the user before calling this tool. Rolling this token will invalidate the current secret and generate a new one. Any integrations using the current secret will stop working.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + }, + "token_id": { + "description": "Token identifier tag.", + "type": "string" + } + }, + required: [ + "account_id", + "token_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Roll Token" + }, + method: "PUT", + path: "/accounts/{account_id}/tokens/{token_id}/value", + extensions: { + "x-api-token-group": [ + "Account API Tokens Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.token.update" + ], + "x-fern-enum": { + "com.cloudflare.api.account.token.update": { + "name": "com_cloudflare_api_account_token_update" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/tokens/${pathParam(args, "token_id")}/value`, + }), + }, + { + name: "accounts_tokens_update", + title: "Update Token", + description: "Update an existing token.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/iam_token_body" + }, + "token_id": { + "description": "Token identifier tag.", + "type": "string" + } + }, + required: [ + "account_id", + "token_id", + "body" + ], + $defs: { + "iam_cidr_list": iam_cidr_list, + "iam_condition": iam_condition, + "iam_effect": iam_effect, + "iam_expires_on": iam_expires_on, + "iam_name": iam_name, + "iam_not_before": iam_not_before, + "iam_permission_group": iam_permission_group, + "iam_permission_group_meta": iam_permission_group_meta, + "iam_permission_groups": iam_permission_groups, + "iam_policy_with_permission_groups_and_resources": iam_policy_with_permission_groups_and_resources, + "iam_request_ip": iam_request_ip, + "iam_resources": iam_resources, + "iam_resources_type_object_nested": iam_resources_type_object_nested, + "iam_resources_type_object_string": iam_resources_type_object_string, + "iam_token_body": iam_token_body, + "iam_token_policies": iam_token_policies, + "iam_token_status": iam_token_status, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update Token" + }, + method: "PUT", + path: "/accounts/{account_id}/tokens/{token_id}", + extensions: { + "x-api-token-group": [ + "Account API Tokens Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.token.update" + ], + "x-fern-enum": { + "com.cloudflare.api.account.token.update": { + "name": "com_cloudflare_api_account_token_update" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/tokens/${pathParam(args, "token_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_tokens_verify", + title: "Verify Token", + description: "Test whether a token works.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Verify Token" + }, + method: "GET", + path: "/accounts/{account_id}/tokens/verify", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/tokens/verify`, + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/tools.ts b/src/generated/forge-mcp/accounts/tools.ts new file mode 100644 index 00000000..8070ac43 --- /dev/null +++ b/src/generated/forge-mcp/accounts/tools.ts @@ -0,0 +1,366 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../_/tool.js"; +import { + iam_account_managed_by, + iam_account_settings, + iam_account_type, + iam_common_components_schemas_identifier, +} from "../schemas.js"; +import { + iam_account, + iam_create_account, + iam_create_account_unit, +} from "./schemas.js"; + +/** + * The tools of `accounts`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_create", + title: "Create an Account", + description: "Create an Account. To create the Account within an Organization, provide `unit.id` and omit `standalone`. To create a standalone Free Account, provide `standalone: true` and omit `unit`. Providing both fields is invalid. If you omit both fields, Cloudflare can determine the destination only when the User is an administrator of exactly one Organization. Cloudflare creates the Account in that Organization; otherwise, the request returns an error.", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/iam_create-account", + "description": "Parameters for account creation" + }, + "idempotency_key": { + "description": "Optional key that identifies an Account-creation request. Free Account creation can require exactly one valid key, so API clients should send a key with every Account-creation request. Reuse the same key when retrying the same request.", + "type": "string" + } + }, + required: [ + "body" + ], + $defs: { + "iam_account-type": iam_account_type, + "iam_create-account": iam_create_account, + "iam_create-account_unit": iam_create_account_unit, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create an Account" + }, + method: "POST", + path: "/accounts", + extensions: { + "x-cfPlanAvailability": { + "business": false, + "enterprise": false, + "free": false, + "pro": false + } + }, + request: (args) => ({ + path: `/accounts`, + headers: [ + ["Idempotency-Key", args["idempotency_key"]], + ], + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_delete", + title: "Delete a specific account", + description: "Delete a specific account (only available for tenant admins at this time). This is a permanent operation that will delete any zones or other resources under the account\n\nConfirm with the user before calling this tool. Are you sure? This action cannot be undone.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account ID of the account to be deleted", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a specific account" + }, + method: "DELETE", + path: "/accounts/{account_id}", + extensions: { + "x-api-token-group": [ + "Account Settings Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#organization:edit" + ], + "x-fern-enum": { + "#organization:edit": { + "name": "organization_edit" + } + } + }, + "x-cfPlanAvailability": { + "business": false, + "enterprise": false, + "free": false, + "pro": false + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}`, + }), + }, + { + name: "accounts_get", + title: "Account Details", + description: "Get information about a specific account that you are a member of.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Account Details" + }, + method: "GET", + path: "/accounts/{account_id}", + extensions: { + "x-api-token-group": [ + "Trust and Safety Write", + "Trust and Safety Read", + "DNS View Write", + "DNS View Read", + "SCIM Provisioning", + "Load Balancers Account Write", + "Load Balancers Account Read", + "Zero Trust: PII Read", + "DDoS Botnet Feed Write", + "DDoS Botnet Feed Read", + "Workers R2 Storage Write", + "Workers R2 Storage Read", + "DDoS Protection Write", + "DDoS Protection Read", + "Workers Tail Read", + "Workers KV Storage Write", + "Workers KV Storage Read", + "Workers Scripts Write", + "Workers Scripts Read", + "Load Balancing: Monitors and Pools Write", + "Load Balancing: Monitors and Pools Read", + "Account Firewall Access Rules Write", + "Account Firewall Access Rules Read", + "DNS Firewall Write", + "DNS Firewall Read", + "Billing Write", + "Billing Read", + "Account Settings Write", + "Account Settings Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#organization:read" + ], + "x-fern-enum": { + "#organization:read": { + "name": "organization_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}`, + }), + }, + { + name: "accounts_list", + title: "List Accounts", + description: "List all accounts you have ownership or verified access to.", + inputSchema: { + type: "object", + properties: { + "direction": { + "description": "Direction to order results.", + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "name": { + "description": "Name of the account.", + "type": "string" + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "number" + }, + "per_page": { + "default": 20, + "description": "Maximum number of results per page.", + "type": "number" + } + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Accounts" + }, + method: "GET", + path: "/accounts", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts`, + query: [ + ["name", args["name"], true], + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["direction", args["direction"], true], + ], + }), + }, + { + name: "accounts_move", + title: "Move account to organization", + description: "Move an account into a destination organization, either assigning a standalone account\nto an organization or moving it between organizations in the same hierarchy. Availability\ndepends on the organization's capabilities.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The ID of the account to move.", + "type": "string" + }, + "body": { + "description": "The destination organization ID is where the account is to be moved.", + "properties": { + "destination_organization_id": { + "description": "The ID of the organization to move the account into.", + "type": "string" + } + }, + "required": [ + "destination_organization_id" + ], + "type": "object" + } + }, + required: [ + "account_id", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Move account to organization" + }, + method: "POST", + path: "/accounts/{account_id}/move", + extensions: { + "x-api-token-group": null + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/move`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_update", + title: "Update Account", + description: "Update an existing account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account identifier tag.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/iam_account" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "iam_account": iam_account, + "iam_account-type": iam_account_type, + "iam_account_managed_by": iam_account_managed_by, + "iam_account_settings": iam_account_settings, + "iam_common_components-schemas-identifier": iam_common_components_schemas_identifier, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update Account" + }, + method: "PUT", + path: "/accounts/{account_id}", + extensions: { + "x-api-token-group": [ + "Account Settings Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#organization:edit" + ], + "x-fern-enum": { + "#organization:edit": { + "name": "organization_edit" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/transformations/tools.ts b/src/generated/forge-mcp/accounts/transformations/tools.ts new file mode 100644 index 00000000..691acfbe --- /dev/null +++ b/src/generated/forge-mcp/accounts/transformations/tools.ts @@ -0,0 +1,55 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `accounts.transformations`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_transformations_list", + title: "List Image Resizing configurations for account", + description: "Returns a list of Image Resizing configurations across all zones for the account.\nThis endpoint is useful for retrieving the transformations (image_resizing) state\nfor all zones belonging to an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Image Resizing configurations for account" + }, + method: "GET", + path: "/accounts/{account_id}/settings/transformations", + extensions: { + "x-api-token-group": [ + "Zone Settings Write", + "Zone Settings Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#zone_settings:read" + ], + "x-fern-enum": { + "#zone_settings:read": { + "name": "zone_settings_read" + } + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/settings/transformations`, + }), + }, +]; diff --git a/src/generated/forge-mcp/accounts/utBilling/schemas.ts b/src/generated/forge-mcp/accounts/utBilling/schemas.ts new file mode 100644 index 00000000..33132de2 --- /dev/null +++ b/src/generated/forge-mcp/accounts/utBilling/schemas.ts @@ -0,0 +1,15 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `speed_ut_billing_value`. + */ +export const speed_ut_billing_value: JsonSchema = { + "description": "Enables Unique Transformations billing for the account.\nNote: once enabled, this setting cannot be set back to \"off\".\n", + "enum": [ + "on" + ], + "type": "string" +}; diff --git a/src/generated/forge-mcp/accounts/utBilling/tools.ts b/src/generated/forge-mcp/accounts/utBilling/tools.ts new file mode 100644 index 00000000..f89e39b4 --- /dev/null +++ b/src/generated/forge-mcp/accounts/utBilling/tools.ts @@ -0,0 +1,117 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { speed_ut_billing_value } from "./schemas.js"; + +/** + * The tools of `accounts.ut_billing`. + */ +export const tools: readonly Tool[] = [ + { + name: "accounts_ut_billing_edit", + title: "Change Unique Transformations billing setting", + description: "Updates the Unique Transformations billing configuration for an account.\nWhen enabled, billing data is directed to the Transformations pipeline.\nNote: setting the value to \"off\" is not permitted once enabled.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier.", + "type": "string" + }, + "body": { + "properties": { + "value": { + "$ref": "#/$defs/speed_ut_billing_value", + "description": "Enables Unique Transformations billing for the account.\nNote: once enabled, this setting cannot be set back to \"off\".\n" + } + }, + "required": [ + "value" + ], + "type": "object" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "speed_ut_billing_value": speed_ut_billing_value, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Change Unique Transformations billing setting" + }, + method: "PATCH", + path: "/accounts/{account_id}/settings/ut-billing", + extensions: { + "x-api-token-group": [ + "Zone Settings Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#zone_settings:edit" + ], + "x-fern-enum": { + "#zone_settings:edit": { + "name": "zone_settings_edit" + } + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/settings/ut-billing`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "accounts_ut_billing_get", + title: "Get Unique Transformations billing setting", + description: "Retrieves the Unique Transformations billing configuration for an account.\nWhen enabled, billing data is directed to the Transformations pipeline.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Unique Transformations billing setting" + }, + method: "GET", + path: "/accounts/{account_id}/settings/ut-billing", + extensions: { + "x-api-token-group": [ + "Zone Settings Write", + "Zone Settings Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#zone_settings:read" + ], + "x-fern-enum": { + "#zone_settings:read": { + "name": "zone_settings_read" + } + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/settings/ut-billing`, + }), + }, +]; diff --git a/src/generated/forge-mcp/acm/customTrustStore/schemas.ts b/src/generated/forge-mcp/acm/customTrustStore/schemas.ts new file mode 100644 index 00000000..b10fbcea --- /dev/null +++ b/src/generated/forge-mcp/acm/customTrustStore/schemas.ts @@ -0,0 +1,12 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `tls-certificates-and-hostnames_certificate-3`. + */ +export const tls_certificates_and_hostnames_certificate_3: JsonSchema = { + "description": "The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.", + "type": "string" +}; diff --git a/src/generated/forge-mcp/acm/customTrustStore/tools.ts b/src/generated/forge-mcp/acm/customTrustStore/tools.ts new file mode 100644 index 00000000..f3b09945 --- /dev/null +++ b/src/generated/forge-mcp/acm/customTrustStore/tools.ts @@ -0,0 +1,272 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { tls_certificates_and_hostnames_certificate_3 } from "./schemas.js"; + +/** + * The tools of `acm.custom_trust_store`. + */ +export const tools: readonly Tool[] = [ + { + name: "acm_custom_trust_store_create", + title: "Upload Custom Origin Trust Store", + description: "Upload a root CA certificate to the Custom Origin Trust Store for a Zone. Only root CA certificates are accepted.", + inputSchema: { + type: "object", + properties: { + "body": { + "properties": { + "certificate": { + "$ref": "#/$defs/tls-certificates-and-hostnames_certificate-3", + "description": "The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported." + } + }, + "required": [ + "certificate" + ], + "type": "object" + }, + "zone_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "tls-certificates-and-hostnames_certificate-3": tls_certificates_and_hostnames_certificate_3, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Upload Custom Origin Trust Store" + }, + method: "POST", + path: "/zones/{zone_id}/acm/custom_trust_store", + extensions: { + "x-api-token-group": [ + "SSL and Certificates Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#ssl:read", + "#ssl:edit" + ], + "x-fern-enum": { + "#ssl:edit": { + "name": "ssl_edit" + }, + "#ssl:read": { + "name": "ssl_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/acm/custom_trust_store`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "acm_custom_trust_store_delete", + title: "Delete Custom Origin Trust Store", + description: "Removes a root CA certificate from the custom origin trust store. Origins using certificates signed by this CA will no longer be trusted.", + inputSchema: { + type: "object", + properties: { + "custom_origin_trust_store_id": { + "description": "Certificate identifier tag.", + "type": "string" + }, + "zone_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "zone_id", + "custom_origin_trust_store_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Custom Origin Trust Store" + }, + method: "DELETE", + path: "/zones/{zone_id}/acm/custom_trust_store/{custom_origin_trust_store_id}", + extensions: { + "x-api-token-group": [ + "SSL and Certificates Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#ssl:read", + "#ssl:edit" + ], + "x-fern-enum": { + "#ssl:edit": { + "name": "ssl_edit" + }, + "#ssl:read": { + "name": "ssl_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/acm/custom_trust_store/${pathParam(args, "custom_origin_trust_store_id")}`, + }), + }, + { + name: "acm_custom_trust_store_get", + title: "Custom Origin Trust Store Details", + description: "Retrieves details about a specific root CA certificate in the custom origin trust store, including expiration and subject information.", + inputSchema: { + type: "object", + properties: { + "custom_origin_trust_store_id": { + "description": "Certificate identifier tag.", + "type": "string" + }, + "zone_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "zone_id", + "custom_origin_trust_store_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Custom Origin Trust Store Details" + }, + method: "GET", + path: "/zones/{zone_id}/acm/custom_trust_store/{custom_origin_trust_store_id}", + extensions: { + "x-api-token-group": [ + "SSL and Certificates Write", + "SSL and Certificates Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#ssl:read" + ], + "x-fern-enum": { + "#ssl:read": { + "name": "ssl_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/acm/custom_trust_store/${pathParam(args, "custom_origin_trust_store_id")}`, + }), + }, + { + name: "acm_custom_trust_store_list", + title: "List Custom Origin Trust Store Details", + description: "Get Custom Origin Trust Store for a Zone.", + inputSchema: { + type: "object", + properties: { + "limit": { + "description": "Limit to the number of records returned.", + "type": "integer" + }, + "offset": { + "description": "Offset the results.", + "type": "integer" + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "number" + }, + "per_page": { + "default": 20, + "description": "Number of records per page.", + "type": "number" + }, + "zone_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "zone_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Custom Origin Trust Store Details" + }, + method: "GET", + path: "/zones/{zone_id}/acm/custom_trust_store", + extensions: { + "x-api-token-group": [ + "SSL and Certificates Write", + "SSL and Certificates Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#ssl:read" + ], + "x-fern-enum": { + "#ssl:read": { + "name": "ssl_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/acm/custom_trust_store`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["limit", args["limit"], true], + ["offset", args["offset"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/acm/totalTls/schemas.ts b/src/generated/forge-mcp/acm/totalTls/schemas.ts new file mode 100644 index 00000000..31da5353 --- /dev/null +++ b/src/generated/forge-mcp/acm/totalTls/schemas.ts @@ -0,0 +1,25 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `tls-certificates-and-hostnames_certificate_authority-3`. + */ +export const tls_certificates_and_hostnames_certificate_authority_3: JsonSchema = { + "description": "The Certificate Authority that Total TLS certificates will be issued through.", + "enum": [ + "google", + "lets_encrypt", + "ssl_com" + ], + "type": "string" +}; + +/** + * The schema of `tls-certificates-and-hostnames_enabled-3`. + */ +export const tls_certificates_and_hostnames_enabled_3: JsonSchema = { + "description": "If enabled, Total TLS will order a hostname specific TLS certificate for any proxied A, AAAA, or CNAME record in your zone.", + "type": "boolean" +}; diff --git a/src/generated/forge-mcp/acm/totalTls/tools.ts b/src/generated/forge-mcp/acm/totalTls/tools.ts new file mode 100644 index 00000000..8d560a13 --- /dev/null +++ b/src/generated/forge-mcp/acm/totalTls/tools.ts @@ -0,0 +1,141 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { + tls_certificates_and_hostnames_certificate_authority_3, + tls_certificates_and_hostnames_enabled_3, +} from "./schemas.js"; + +/** + * The tools of `acm.total_tls`. + */ +export const tools: readonly Tool[] = [ + { + name: "acm_total_tls_edit", + title: "Enable or Disable Total TLS", + description: "Set Total TLS Settings or disable the feature for a Zone.", + inputSchema: { + type: "object", + properties: { + "body": { + "properties": { + "certificate_authority": { + "$ref": "#/$defs/tls-certificates-and-hostnames_certificate_authority-3", + "description": "The Certificate Authority that Total TLS certificates will be issued through." + }, + "enabled": { + "$ref": "#/$defs/tls-certificates-and-hostnames_enabled-3", + "description": "If enabled, Total TLS will order a hostname specific TLS certificate for any proxied A, AAAA, or CNAME record in your zone." + } + }, + "required": [ + "enabled" + ], + "type": "object" + }, + "zone_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "tls-certificates-and-hostnames_certificate_authority-3": tls_certificates_and_hostnames_certificate_authority_3, + "tls-certificates-and-hostnames_enabled-3": tls_certificates_and_hostnames_enabled_3, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Enable or Disable Total TLS" + }, + method: "POST", + path: "/zones/{zone_id}/acm/total_tls", + extensions: { + "x-api-token-group": [ + "SSL and Certificates Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#ssl:read", + "#ssl:edit" + ], + "x-fern-enum": { + "#ssl:edit": { + "name": "ssl_edit" + }, + "#ssl:read": { + "name": "ssl_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/acm/total_tls`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "acm_total_tls_get", + title: "Total TLS Settings Details", + description: "Get Total TLS Settings for a Zone.", + inputSchema: { + type: "object", + properties: { + "zone_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "zone_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Total TLS Settings Details" + }, + method: "GET", + path: "/zones/{zone_id}/acm/total_tls", + extensions: { + "x-api-token-group": [ + "SSL and Certificates Write", + "SSL and Certificates Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#ssl:read" + ], + "x-fern-enum": { + "#ssl:read": { + "name": "ssl_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/acm/total_tls`, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/addressMaps/accounts/tools.ts b/src/generated/forge-mcp/addressing/addressMaps/accounts/tools.ts new file mode 100644 index 00000000..2dbe4db7 --- /dev/null +++ b/src/generated/forge-mcp/addressing/addressMaps/accounts/tools.ts @@ -0,0 +1,93 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `addressing.address_maps.accounts`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_address_maps_accounts_delete", + title: "Remove an account membership from an Address Map", + description: "Remove an account as a member of a particular address map.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "address_map_id": { + "description": "Identifier of an Address Map.", + "type": "string" + }, + "member_account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + } + }, + required: [ + "account_id", + "address_map_id", + "member_account_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Remove an account membership from an Address Map" + }, + method: "DELETE", + path: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{member_account_id}", + extensions: { + "x-api-token-group": [ + "Address Maps Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps/${pathParam(args, "address_map_id")}/accounts/${pathParam(args, "member_account_id")}`, + }), + }, + { + name: "addressing_address_maps_accounts_update", + title: "Add an account membership to an Address Map", + description: "Add an account as a member of a particular address map.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "address_map_id": { + "description": "Identifier of an Address Map.", + "type": "string" + }, + "member_account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + } + }, + required: [ + "account_id", + "address_map_id", + "member_account_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Add an account membership to an Address Map" + }, + method: "PUT", + path: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/accounts/{member_account_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps/${pathParam(args, "address_map_id")}/accounts/${pathParam(args, "member_account_id")}`, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/addressMaps/ips/tools.ts b/src/generated/forge-mcp/addressing/addressMaps/ips/tools.ts new file mode 100644 index 00000000..0d38fb09 --- /dev/null +++ b/src/generated/forge-mcp/addressing/addressMaps/ips/tools.ts @@ -0,0 +1,210 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { addressing_ip_address } from "../schemas.js"; + +/** + * The tools of `addressing.address_maps.ips`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_address_maps_ips_delete", + title: "Remove an IP from an Address Map", + description: "Remove an IP from a particular address map.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "address_map_id": { + "description": "Identifier of an Address Map.", + "type": "string" + }, + "ip_address": { + "description": "An IPv4 or IPv6 address.", + "type": "string" + } + }, + required: [ + "account_id", + "address_map_id", + "ip_address" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Remove an IP from an Address Map" + }, + method: "DELETE", + path: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}", + extensions: { + "x-api-token-group": [ + "Address Maps Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps/${pathParam(args, "address_map_id")}/ips/${pathParam(args, "ip_address")}`, + }), + }, + { + name: "addressing_address_maps_ips_delete_bulk", + title: "Remove Multiple IPs from an Address Map", + description: "Remove multiple IPs from a particular address map.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "address_map_id": { + "description": "Identifier of an Address Map.", + "type": "string" + }, + "body": { + "properties": { + "ips": { + "items": { + "$ref": "#/$defs/addressing_ip_address" + }, + "type": "array" + } + }, + "required": [ + "ips" + ], + "type": "object" + } + }, + required: [ + "account_id", + "address_map_id", + "body" + ], + $defs: { + "addressing_ip_address": addressing_ip_address, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Remove Multiple IPs from an Address Map" + }, + method: "DELETE", + path: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips", + extensions: { + "x-api-token-group": [ + "Address Maps Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps/${pathParam(args, "address_map_id")}/ips`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "addressing_address_maps_ips_update", + title: "Add an IP to an Address Map", + description: "Add an IP from a prefix owned by the account to a particular address map.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "address_map_id": { + "description": "Identifier of an Address Map.", + "type": "string" + }, + "ip_address": { + "description": "An IPv4 or IPv6 address.", + "type": "string" + } + }, + required: [ + "account_id", + "address_map_id", + "ip_address" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Add an IP to an Address Map" + }, + method: "PUT", + path: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips/{ip_address}", + extensions: { + "x-api-token-group": [ + "Address Maps Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps/${pathParam(args, "address_map_id")}/ips/${pathParam(args, "ip_address")}`, + }), + }, + { + name: "addressing_address_maps_ips_update_bulk", + title: "Add Multiple IPs to an Address Map", + description: "Add multiple IPs to a particular address map.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "address_map_id": { + "description": "Identifier of an Address Map.", + "type": "string" + }, + "body": { + "properties": { + "ips": { + "items": { + "$ref": "#/$defs/addressing_ip_address" + }, + "type": "array" + } + }, + "required": [ + "ips" + ], + "type": "object" + } + }, + required: [ + "account_id", + "address_map_id", + "body" + ], + $defs: { + "addressing_ip_address": addressing_ip_address, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Add Multiple IPs to an Address Map" + }, + method: "POST", + path: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/ips", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps/${pathParam(args, "address_map_id")}/ips`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/addressMaps/schemas.ts b/src/generated/forge-mcp/addressing/addressMaps/schemas.ts new file mode 100644 index 00000000..06c30722 --- /dev/null +++ b/src/generated/forge-mcp/addressing/addressMaps/schemas.ts @@ -0,0 +1,105 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `addressing_address-maps-membership-request`. + */ +export const addressing_address_maps_membership_request: JsonSchema = { + "properties": { + "identifier": { + "$ref": "#/$defs/addressing_identifier", + "description": "The identifier for the membership (eg. a zone or account tag)." + }, + "kind": { + "$ref": "#/$defs/addressing_kind", + "description": "The type of the membership." + } + }, + "type": "object" +}; + +/** + * The schema of `addressing_default_sni`. + */ +export const addressing_default_sni: JsonSchema = { + "description": "If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] +}; + +/** + * The schema of `addressing_description-2`. + */ +export const addressing_description_2: JsonSchema = { + "description": "An optional description field which may be used to describe the types of IPs or zones on the map.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] +}; + +/** + * The schema of `addressing_enabled`. + */ +export const addressing_enabled: JsonSchema = { + "description": "Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled.", + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] +}; + +/** + * The schema of `addressing_identifier`. + */ +export const addressing_identifier: JsonSchema = { + "description": "The identifier for the membership (eg. a zone or account tag).", + "type": "string" +}; + +/** + * The schema of `addressing_ip_address`. + */ +export const addressing_ip_address: JsonSchema = { + "description": "An IPv4 or IPv6 address.", + "type": "string" +}; + +/** + * The schema of `addressing_kind`. + */ +export const addressing_kind: JsonSchema = { + "description": "The type of the membership.", + "enum": [ + "zone", + "account" + ], + "type": "string" +}; + +/** + * The schema of `addressing_membership_requests`. + */ +export const addressing_membership_requests: JsonSchema = { + "description": "Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership.", + "items": { + "$ref": "#/$defs/addressing_address-maps-membership-request" + }, + "type": "array" +}; diff --git a/src/generated/forge-mcp/addressing/addressMaps/tools.ts b/src/generated/forge-mcp/addressing/addressMaps/tools.ts new file mode 100644 index 00000000..9b4873cc --- /dev/null +++ b/src/generated/forge-mcp/addressing/addressMaps/tools.ts @@ -0,0 +1,267 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { + addressing_address_maps_membership_request, + addressing_default_sni, + addressing_description_2, + addressing_enabled, + addressing_identifier, + addressing_ip_address, + addressing_kind, + addressing_membership_requests, +} from "./schemas.js"; + +/** + * The tools of `addressing.address_maps`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_address_maps_create", + title: "Create Address Map", + description: "Create a new address map under the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "body": { + "properties": { + "description": { + "$ref": "#/$defs/addressing_description-2", + "description": "An optional description field which may be used to describe the types of IPs or zones on the map." + }, + "enabled": { + "$ref": "#/$defs/addressing_enabled", + "default": false, + "description": "Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled." + }, + "ips": { + "items": { + "$ref": "#/$defs/addressing_ip_address" + }, + "type": "array" + }, + "memberships": { + "$ref": "#/$defs/addressing_membership_requests", + "description": "Zones and Accounts which will be assigned IPs on this Address Map. A zone membership will take priority over an account membership." + } + }, + "type": "object" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "addressing_address-maps-membership-request": addressing_address_maps_membership_request, + "addressing_description-2": addressing_description_2, + "addressing_enabled": addressing_enabled, + "addressing_identifier": addressing_identifier, + "addressing_ip_address": addressing_ip_address, + "addressing_kind": addressing_kind, + "addressing_membership_requests": addressing_membership_requests, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create Address Map" + }, + method: "POST", + path: "/accounts/{account_id}/addressing/address_maps", + extensions: { + "x-api-token-group": [ + "Address Maps Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "addressing_address_maps_delete", + title: "Delete Address Map", + description: "Delete a particular address map owned by the account. An Address Map must be disabled before it can be deleted.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "address_map_id": { + "description": "Identifier of an Address Map.", + "type": "string" + } + }, + required: [ + "account_id", + "address_map_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Address Map" + }, + method: "DELETE", + path: "/accounts/{account_id}/addressing/address_maps/{address_map_id}", + extensions: { + "x-api-token-group": [ + "Address Maps Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps/${pathParam(args, "address_map_id")}`, + }), + }, + { + name: "addressing_address_maps_edit", + title: "Update Address Map", + description: "Modify properties of an address map owned by the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "address_map_id": { + "description": "Identifier of an Address Map.", + "type": "string" + }, + "body": { + "properties": { + "default_sni": { + "$ref": "#/$defs/addressing_default_sni", + "description": "If you have legacy TLS clients which do not send the TLS server name indicator, then you can specify one default SNI on the map. If Cloudflare receives a TLS handshake from a client without an SNI, it will respond with the default SNI on those IPs. The default SNI can be any valid zone or subdomain owned by the account." + }, + "description": { + "$ref": "#/$defs/addressing_description-2", + "description": "An optional description field which may be used to describe the types of IPs or zones on the map." + }, + "enabled": { + "$ref": "#/$defs/addressing_enabled", + "default": false, + "description": "Whether the Address Map is enabled or not. Cloudflare's DNS will not respond with IP addresses on an Address Map until the map is enabled." + } + }, + "type": "object" + } + }, + required: [ + "account_id", + "address_map_id", + "body" + ], + $defs: { + "addressing_default_sni": addressing_default_sni, + "addressing_description-2": addressing_description_2, + "addressing_enabled": addressing_enabled, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update Address Map" + }, + method: "PATCH", + path: "/accounts/{account_id}/addressing/address_maps/{address_map_id}", + extensions: { + "x-api-token-group": [ + "Address Maps Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps/${pathParam(args, "address_map_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "addressing_address_maps_get", + title: "Address Map Details", + description: "Show a particular address map owned by the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "address_map_id": { + "description": "Identifier of an Address Map.", + "type": "string" + } + }, + required: [ + "account_id", + "address_map_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Address Map Details" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/address_maps/{address_map_id}", + extensions: { + "x-api-token-group": [ + "Address Maps Write", + "Address Maps Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps/${pathParam(args, "address_map_id")}`, + }), + }, + { + name: "addressing_address_maps_list", + title: "List Address Maps", + description: "List all address maps owned by the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Address Maps" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/address_maps", + extensions: { + "x-api-token-group": [ + "Address Maps Write", + "Address Maps Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps`, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/addressMaps/zones/schemas.ts b/src/generated/forge-mcp/addressing/addressMaps/zones/schemas.ts new file mode 100644 index 00000000..a5ddc95e --- /dev/null +++ b/src/generated/forge-mcp/addressing/addressMaps/zones/schemas.ts @@ -0,0 +1,12 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../_/tool.js"; + +/** + * The schema of `addressing_zone_identifier`. + */ +export const addressing_zone_identifier: JsonSchema = { + "description": "Identifier of a zone.", + "type": "string" +}; diff --git a/src/generated/forge-mcp/addressing/addressMaps/zones/tools.ts b/src/generated/forge-mcp/addressing/addressMaps/zones/tools.ts new file mode 100644 index 00000000..6e99f314 --- /dev/null +++ b/src/generated/forge-mcp/addressing/addressMaps/zones/tools.ts @@ -0,0 +1,205 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { addressing_zone_identifier } from "./schemas.js"; + +/** + * The tools of `addressing.address_maps.zones`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_address_maps_zones_delete", + title: "Remove a zone membership from an Address Map", + description: "Remove a zone as a member of a particular address map.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "address_map_id": { + "description": "Identifier of an Address Map.", + "type": "string" + }, + "member_zone_id": { + "description": "Identifier of a zone.", + "type": "string" + } + }, + required: [ + "account_id", + "address_map_id", + "member_zone_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Remove a zone membership from an Address Map" + }, + method: "DELETE", + path: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones/{member_zone_id}", + extensions: { + "x-api-token-group": [ + "Address Maps Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps/${pathParam(args, "address_map_id")}/zones/${pathParam(args, "member_zone_id")}`, + }), + }, + { + name: "addressing_address_maps_zones_delete_bulk", + title: "Remove Multiple Zones from an Address Map", + description: "Remove multiple zones as members of a particular address map.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "address_map_id": { + "description": "Identifier of an Address Map.", + "type": "string" + }, + "body": { + "properties": { + "zones": { + "items": { + "$ref": "#/$defs/addressing_zone_identifier" + }, + "type": "array" + } + }, + "required": [ + "zones" + ], + "type": "object" + } + }, + required: [ + "account_id", + "address_map_id", + "body" + ], + $defs: { + "addressing_zone_identifier": addressing_zone_identifier, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Remove Multiple Zones from an Address Map" + }, + method: "DELETE", + path: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones", + extensions: { + "x-api-token-group": [ + "Address Maps Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps/${pathParam(args, "address_map_id")}/zones`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "addressing_address_maps_zones_update", + title: "Add a zone membership to an Address Map", + description: "Add a zone as a member of a particular address map.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "address_map_id": { + "description": "Identifier of an Address Map.", + "type": "string" + }, + "member_zone_id": { + "description": "Identifier of a zone.", + "type": "string" + } + }, + required: [ + "account_id", + "address_map_id", + "member_zone_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Add a zone membership to an Address Map" + }, + method: "PUT", + path: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones/{member_zone_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps/${pathParam(args, "address_map_id")}/zones/${pathParam(args, "member_zone_id")}`, + }), + }, + { + name: "addressing_address_maps_zones_update_bulk", + title: "Add Multiple Zones to an Address Map", + description: "Add multiple zones as members of a particular address map.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "address_map_id": { + "description": "Identifier of an Address Map.", + "type": "string" + }, + "body": { + "properties": { + "zones": { + "items": { + "$ref": "#/$defs/addressing_zone_identifier" + }, + "type": "array" + } + }, + "required": [ + "zones" + ], + "type": "object" + } + }, + required: [ + "account_id", + "address_map_id", + "body" + ], + $defs: { + "addressing_zone_identifier": addressing_zone_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Add Multiple Zones to an Address Map" + }, + method: "POST", + path: "/accounts/{account_id}/addressing/address_maps/{address_map_id}/zones", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/address_maps/${pathParam(args, "address_map_id")}/zones`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/leases/tools.ts b/src/generated/forge-mcp/addressing/leases/tools.ts new file mode 100644 index 00000000..a432a4e3 --- /dev/null +++ b/src/generated/forge-mcp/addressing/leases/tools.ts @@ -0,0 +1,42 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `addressing.leases`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_leases_list", + title: "List Leases", + description: "List all leases owned by the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Leases" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/leases", + extensions: { + "x-api-token-group": null + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/leases`, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/loaDocuments/tools.ts b/src/generated/forge-mcp/addressing/loaDocuments/tools.ts new file mode 100644 index 00000000..c67e5ebf --- /dev/null +++ b/src/generated/forge-mcp/addressing/loaDocuments/tools.ts @@ -0,0 +1,85 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `addressing.loa_documents`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_loa_documents_get", + title: "Download LOA Document", + description: "Download specified LOA document under the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "loa_document_id": { + "description": "Identifier for the uploaded LOA document.", + "type": "string" + } + }, + required: [ + "account_id", + "loa_document_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Download LOA Document" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/loa_documents/{loa_document_id}/download", + extensions: { + "x-api-token-group": [ + "Magic Transit Read", + "Magic Transit Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/loa_documents/${pathParam(args, "loa_document_id")}/download`, + }), + }, + { + name: "addressing_loa_documents_list", + title: "List LOA Documents", + description: "List all LOA documents uploaded under the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List LOA Documents" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/loa_documents", + extensions: { + "x-api-token-group": [ + "Magic Transit Read", + "Magic Transit Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/loa_documents`, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/prefixes/bgpPrefixes/schemas.ts b/src/generated/forge-mcp/addressing/prefixes/bgpPrefixes/schemas.ts new file mode 100644 index 00000000..3c9addec --- /dev/null +++ b/src/generated/forge-mcp/addressing/prefixes/bgpPrefixes/schemas.ts @@ -0,0 +1,70 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../_/tool.js"; + +/** + * The schema of `addressing_asn_prepend_count`. + */ +export const addressing_asn_prepend_count: JsonSchema = { + "description": "Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute", + "type": "integer" +}; + +/** + * The schema of `addressing_auto_advertise_withdraw`. + */ +export const addressing_auto_advertise_withdraw: JsonSchema = { + "description": "Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no matching BGP prefix in the Magic routing table. When true, Cloudflare will automatically withdraw the BGP prefix when there are no matching BGP routes, and will resume advertising when there is at least one matching BGP route.", + "type": "boolean" +}; + +/** + * The schema of `addressing_bgp_prefix_create`. + */ +export const addressing_bgp_prefix_create: JsonSchema = { + "properties": { + "cidr": { + "$ref": "#/$defs/addressing_cidr", + "description": "IP Prefix in Classless Inter-Domain Routing format." + } + }, + "required": [ + "cidr" + ], + "type": "object" +}; + +/** + * The schema of `addressing_bgp_prefix_update_advertisement`. + */ +export const addressing_bgp_prefix_update_advertisement: JsonSchema = { + "properties": { + "asn_prepend_count": { + "$ref": "#/$defs/addressing_asn_prepend_count", + "default": 0, + "description": "Number of times to prepend the Cloudflare ASN to the BGP AS-Path attribute" + }, + "auto_advertise_withdraw": { + "$ref": "#/$defs/addressing_auto_advertise_withdraw", + "default": false, + "description": "Determines if Cloudflare advertises a BYOIP BGP prefix even when there is no matching BGP prefix in the Magic routing table. When true, Cloudflare will automatically withdraw the BGP prefix when there are no matching BGP routes, and will resume advertising when there is at least one matching BGP route." + }, + "on_demand": { + "$ref": "#/$defs/addressing_bgp_prefix_update_advertisement_on_demand" + } + }, + "type": "object" +}; + +/** + * The schema of `addressing_bgp_prefix_update_advertisement_on_demand`. + */ +export const addressing_bgp_prefix_update_advertisement_on_demand: JsonSchema = { + "properties": { + "advertised": { + "type": "boolean" + } + }, + "type": "object" +}; diff --git a/src/generated/forge-mcp/addressing/prefixes/bgpPrefixes/tools.ts b/src/generated/forge-mcp/addressing/prefixes/bgpPrefixes/tools.ts new file mode 100644 index 00000000..579771d3 --- /dev/null +++ b/src/generated/forge-mcp/addressing/prefixes/bgpPrefixes/tools.ts @@ -0,0 +1,250 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { addressing_cidr } from "../schemas.js"; +import { + addressing_asn_prepend_count, + addressing_auto_advertise_withdraw, + addressing_bgp_prefix_create, + addressing_bgp_prefix_update_advertisement, + addressing_bgp_prefix_update_advertisement_on_demand, +} from "./schemas.js"; + +/** + * The tools of `addressing.prefixes.bgp_prefixes`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_prefixes_bgp_prefixes_create", + title: "Create BGP Prefix", + description: "Create a BGP prefix, controlling the BGP advertisement status of a specific subnet. When created, BGP prefixes are initially withdrawn, and can be advertised with the Update BGP Prefix API.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/addressing_bgp_prefix_create" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id", + "body" + ], + $defs: { + "addressing_bgp_prefix_create": addressing_bgp_prefix_create, + "addressing_cidr": addressing_cidr, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create BGP Prefix" + }, + method: "POST", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}/bgp/prefixes`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "addressing_prefixes_bgp_prefixes_delete", + title: "Delete BGP Prefix", + description: "Delete a BGP Prefix associated with the specified IP Prefix. A BGP Prefix must be withdrawn before it can be deleted.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "bgp_prefix_id": { + "description": "Identifier of BGP Prefix.", + "type": "string" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id", + "bgp_prefix_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete BGP Prefix" + }, + method: "DELETE", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}/bgp/prefixes/${pathParam(args, "bgp_prefix_id")}`, + }), + }, + { + name: "addressing_prefixes_bgp_prefixes_edit", + title: "Update BGP Prefix", + description: "Update the properties of a BGP Prefix, such as the on demand advertisement status (advertised or withdrawn).", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "bgp_prefix_id": { + "description": "Identifier of BGP Prefix.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/addressing_bgp_prefix_update_advertisement" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id", + "bgp_prefix_id", + "body" + ], + $defs: { + "addressing_asn_prepend_count": addressing_asn_prepend_count, + "addressing_auto_advertise_withdraw": addressing_auto_advertise_withdraw, + "addressing_bgp_prefix_update_advertisement": addressing_bgp_prefix_update_advertisement, + "addressing_bgp_prefix_update_advertisement_on_demand": addressing_bgp_prefix_update_advertisement_on_demand, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update BGP Prefix" + }, + method: "PATCH", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}", + extensions: { + "x-api-token-group": [ + "Magic Transit Write", + "IP Prefixes: Write", + "IP Prefixes: BGP On Demand Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}/bgp/prefixes/${pathParam(args, "bgp_prefix_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "addressing_prefixes_bgp_prefixes_get", + title: "Fetch BGP Prefix", + description: "Retrieve a single BGP Prefix according to its identifier", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "bgp_prefix_id": { + "description": "Identifier of BGP Prefix.", + "type": "string" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id", + "bgp_prefix_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Fetch BGP Prefix" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes/{bgp_prefix_id}", + extensions: { + "x-api-token-group": [ + "Magic Transit Read", + "Magic Transit Write", + "IP Prefixes: Write", + "IP Prefixes: Read", + "IP Prefixes: BGP On Demand Write", + "IP Prefixes: BGP On Demand Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}/bgp/prefixes/${pathParam(args, "bgp_prefix_id")}`, + }), + }, + { + name: "addressing_prefixes_bgp_prefixes_list", + title: "List BGP Prefixes", + description: "List all BGP Prefixes within the specified IP Prefix. BGP Prefixes are used to control which specific subnets are advertised to the Internet. It is possible to advertise subnets more specific than an IP Prefix by creating more specific BGP Prefixes.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List BGP Prefixes" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes", + extensions: { + "x-api-token-group": [ + "Magic Transit Read", + "Magic Transit Write", + "IP Prefixes: Write", + "IP Prefixes: Read", + "IP Prefixes: BGP On Demand Write", + "IP Prefixes: BGP On Demand Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}/bgp/prefixes`, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/prefixes/delegations/schemas.ts b/src/generated/forge-mcp/addressing/prefixes/delegations/schemas.ts new file mode 100644 index 00000000..09ccf2d5 --- /dev/null +++ b/src/generated/forge-mcp/addressing/prefixes/delegations/schemas.ts @@ -0,0 +1,12 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../_/tool.js"; + +/** + * The schema of `addressing_delegated_account_identifier`. + */ +export const addressing_delegated_account_identifier: JsonSchema = { + "description": "Account identifier for the account to which prefix is being delegated.", + "type": "string" +}; diff --git a/src/generated/forge-mcp/addressing/prefixes/delegations/tools.ts b/src/generated/forge-mcp/addressing/prefixes/delegations/tools.ts new file mode 100644 index 00000000..c7ef7596 --- /dev/null +++ b/src/generated/forge-mcp/addressing/prefixes/delegations/tools.ts @@ -0,0 +1,152 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { addressing_cidr } from "../schemas.js"; +import { addressing_delegated_account_identifier } from "./schemas.js"; + +/** + * The tools of `addressing.prefixes.delegations`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_prefixes_delegations_create", + title: "Create Prefix Delegation", + description: "Create a new account delegation for a given IP prefix.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "body": { + "properties": { + "cidr": { + "$ref": "#/$defs/addressing_cidr", + "description": "IP Prefix in Classless Inter-Domain Routing format." + }, + "delegated_account_id": { + "$ref": "#/$defs/addressing_delegated_account_identifier", + "description": "Account identifier for the account to which prefix is being delegated." + } + }, + "required": [ + "cidr", + "delegated_account_id" + ], + "type": "object" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id", + "body" + ], + $defs: { + "addressing_cidr": addressing_cidr, + "addressing_delegated_account_identifier": addressing_delegated_account_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create Prefix Delegation" + }, + method: "POST", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations", + extensions: { + "x-api-token-group": [ + "IP Prefixes: Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}/delegations`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "addressing_prefixes_delegations_delete", + title: "Delete Prefix Delegation", + description: "Delete an account delegation for a given IP prefix.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "delegation_id": { + "description": "Identifier of a Delegation.", + "type": "string" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id", + "delegation_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Prefix Delegation" + }, + method: "DELETE", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations/{delegation_id}", + extensions: { + "x-api-token-group": [ + "IP Prefixes: Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}/delegations/${pathParam(args, "delegation_id")}`, + }), + }, + { + name: "addressing_prefixes_delegations_list", + title: "List Prefix Delegations", + description: "List all delegations for a given account IP prefix.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Prefix Delegations" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}/delegations`, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/prefixes/schemas.ts b/src/generated/forge-mcp/addressing/prefixes/schemas.ts new file mode 100644 index 00000000..5010862c --- /dev/null +++ b/src/generated/forge-mcp/addressing/prefixes/schemas.ts @@ -0,0 +1,36 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `addressing_asn`. + */ +export const addressing_asn: JsonSchema = { + "description": "Autonomous System Number (ASN) the prefix will be advertised under.", + "type": "integer" +}; + +/** + * The schema of `addressing_cidr`. + */ +export const addressing_cidr: JsonSchema = { + "description": "IP Prefix in Classless Inter-Domain Routing format.", + "type": "string" +}; + +/** + * The schema of `addressing_delegate_loa_creation`. + */ +export const addressing_delegate_loa_creation: JsonSchema = { + "description": "Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner.", + "type": "boolean" +}; + +/** + * The schema of `addressing_description`. + */ +export const addressing_description: JsonSchema = { + "description": "Description of the prefix.", + "type": "string" +}; diff --git a/src/generated/forge-mcp/addressing/prefixes/serviceBindings/schemas.ts b/src/generated/forge-mcp/addressing/prefixes/serviceBindings/schemas.ts new file mode 100644 index 00000000..b77401f3 --- /dev/null +++ b/src/generated/forge-mcp/addressing/prefixes/serviceBindings/schemas.ts @@ -0,0 +1,25 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../_/tool.js"; + +/** + * The schema of `addressing_create_binding_request`. + */ +export const addressing_create_binding_request: JsonSchema = { + "properties": { + "cidr": { + "$ref": "#/$defs/addressing_cidr", + "description": "IP Prefix in Classless Inter-Domain Routing format." + }, + "service_id": { + "$ref": "#/$defs/addressing_service_identifier", + "description": "Identifier of a Service on the Cloudflare network. Available services and their IDs may be found in the\n**List Services** endpoint.\n" + } + }, + "required": [ + "cidr", + "service_id" + ], + "type": "object" +}; diff --git a/src/generated/forge-mcp/addressing/prefixes/serviceBindings/tools.ts b/src/generated/forge-mcp/addressing/prefixes/serviceBindings/tools.ts new file mode 100644 index 00000000..4184111c --- /dev/null +++ b/src/generated/forge-mcp/addressing/prefixes/serviceBindings/tools.ts @@ -0,0 +1,190 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { addressing_service_identifier } from "../../schemas.js"; +import { addressing_cidr } from "../schemas.js"; +import { addressing_create_binding_request } from "./schemas.js"; + +/** + * The tools of `addressing.prefixes.service_bindings`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_prefixes_service_bindings_create", + title: "Create Service Binding", + description: "Creates a new Service Binding, routing traffic to IPs within the given CIDR to a service running on Cloudflare's network.\n**NOTE:** The first Service Binding created for an IP Prefix must exactly match the IP Prefix's CIDR. Subsequent Service Bindings may be created with a more-specific CIDR. Refer to the [Service Bindings Documentation](https://developers.cloudflare.com/byoip/service-bindings/) for compatibility details.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/addressing_create_binding_request" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id" + ], + $defs: { + "addressing_cidr": addressing_cidr, + "addressing_create_binding_request": addressing_create_binding_request, + "addressing_service_identifier": addressing_service_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create Service Binding" + }, + method: "POST", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings", + extensions: { + "x-api-token-group": [ + "IP Prefixes: Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}/bindings`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "addressing_prefixes_service_bindings_delete", + title: "Delete Service Binding", + description: "Delete a Service Binding", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "binding_id": { + "description": "Identifier of a Service Binding.", + "type": "string" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id", + "binding_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Service Binding" + }, + method: "DELETE", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings/{binding_id}", + extensions: { + "x-api-token-group": [ + "IP Prefixes: Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}/bindings/${pathParam(args, "binding_id")}`, + }), + }, + { + name: "addressing_prefixes_service_bindings_get", + title: "Get Service Binding", + description: "Fetch a single Service Binding", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "binding_id": { + "description": "Identifier of a Service Binding.", + "type": "string" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id", + "binding_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Service Binding" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings/{binding_id}", + extensions: { + "x-api-token-group": [ + "IP Prefixes: Write", + "IP Prefixes: Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}/bindings/${pathParam(args, "binding_id")}`, + }), + }, + { + name: "addressing_prefixes_service_bindings_list", + title: "List Service Bindings", + description: "List the Cloudflare services this prefix is currently bound to. Traffic sent to an address within an IP prefix will be routed to the Cloudflare service of the most-specific Service Binding matching the address.\n**Example:** binding `192.0.2.0/24` to Cloudflare Magic Transit and `192.0.2.1/32` to the Cloudflare CDN would route traffic for `192.0.2.1` to the CDN, and traffic for all other IPs in the prefix to Cloudflare Magic Transit.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Service Bindings" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings", + extensions: { + "x-api-token-group": [ + "IP Prefixes: Write", + "IP Prefixes: Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}/bindings`, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/prefixes/tools.ts b/src/generated/forge-mcp/addressing/prefixes/tools.ts new file mode 100644 index 00000000..4b170fbc --- /dev/null +++ b/src/generated/forge-mcp/addressing/prefixes/tools.ts @@ -0,0 +1,267 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { addressing_loa_document_identifier } from "../schemas.js"; +import { + addressing_asn, + addressing_cidr, + addressing_delegate_loa_creation, + addressing_description, +} from "./schemas.js"; + +/** + * The tools of `addressing.prefixes`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_prefixes_create", + title: "Add Prefix", + description: "Add a new prefix under the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "body": { + "properties": { + "asn": { + "$ref": "#/$defs/addressing_asn", + "description": "Autonomous System Number (ASN) the prefix will be advertised under." + }, + "cidr": { + "$ref": "#/$defs/addressing_cidr", + "description": "IP Prefix in Classless Inter-Domain Routing format." + }, + "delegate_loa_creation": { + "$ref": "#/$defs/addressing_delegate_loa_creation", + "default": false, + "description": "Whether Cloudflare is allowed to generate the LOA document on behalf of the prefix owner." + }, + "description": { + "$ref": "#/$defs/addressing_description", + "description": "Description of the prefix." + }, + "loa_document_id": { + "$ref": "#/$defs/addressing_loa_document_identifier", + "description": "Identifier for the uploaded LOA document." + } + }, + "required": [ + "asn", + "cidr" + ], + "type": "object" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "addressing_asn": addressing_asn, + "addressing_cidr": addressing_cidr, + "addressing_delegate_loa_creation": addressing_delegate_loa_creation, + "addressing_description": addressing_description, + "addressing_loa_document_identifier": addressing_loa_document_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Add Prefix" + }, + method: "POST", + path: "/accounts/{account_id}/addressing/prefixes", + extensions: { + "x-api-token-group": null + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "addressing_prefixes_delete", + title: "Delete Prefix", + description: "Delete an unapproved prefix owned by the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Prefix" + }, + method: "DELETE", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}", + extensions: { + "x-api-token-group": [ + "Magic Transit Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}`, + }), + }, + { + name: "addressing_prefixes_edit", + title: "Update Prefix Description", + description: "Modify the description for a prefix owned by the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "body": { + "properties": { + "description": { + "$ref": "#/$defs/addressing_description", + "description": "Description of the prefix." + } + }, + "required": [ + "description" + ], + "type": "object" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id", + "body" + ], + $defs: { + "addressing_description": addressing_description, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update Prefix Description" + }, + method: "PATCH", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}", + extensions: { + "x-api-token-group": [ + "Magic Transit Write", + "IP Prefixes: Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "addressing_prefixes_get", + title: "Prefix Details", + description: "List a particular prefix owned by the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Prefix Details" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}", + extensions: { + "x-api-token-group": [ + "Magic Transit Read", + "Magic Transit Write", + "IP Prefixes: Write", + "IP Prefixes: Read", + "IP Prefixes: BGP On Demand Write", + "IP Prefixes: BGP On Demand Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}`, + }), + }, + { + name: "addressing_prefixes_list", + title: "List Prefixes", + description: "List all prefixes owned by the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Prefixes" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/prefixes", + extensions: { + "x-api-token-group": [ + "Magic Transit Read", + "Magic Transit Write", + "IP Prefixes: Write", + "IP Prefixes: Read", + "IP Prefixes: BGP On Demand Write", + "IP Prefixes: BGP On Demand Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes`, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/prefixes/validate/tools.ts b/src/generated/forge-mcp/addressing/prefixes/validate/tools.ts new file mode 100644 index 00000000..3806a566 --- /dev/null +++ b/src/generated/forge-mcp/addressing/prefixes/validate/tools.ts @@ -0,0 +1,50 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `addressing.prefixes.validate`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_prefixes_validate_create", + title: "Validate Prefix", + description: "Triggers a new prefix validation. The checks are run asynchronously and include IRR, RPKI, and prefix ownership.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + }, + "prefix_id": { + "description": "Identifier of an IP Prefix.", + "type": "string" + } + }, + required: [ + "account_id", + "prefix_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Validate Prefix" + }, + method: "POST", + path: "/accounts/{account_id}/addressing/prefixes/{prefix_id}/validate", + extensions: { + "x-api-token-group": [ + "Magic Transit Write", + "IP Prefixes: Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/prefixes/${pathParam(args, "prefix_id")}/validate`, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/regionalHostnames/regions/tools.ts b/src/generated/forge-mcp/addressing/regionalHostnames/regions/tools.ts new file mode 100644 index 00000000..834720b0 --- /dev/null +++ b/src/generated/forge-mcp/addressing/regionalHostnames/regions/tools.ts @@ -0,0 +1,49 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { dls_identifier } from "../schemas.js"; + +/** + * The tools of `addressing.regional_hostnames.regions`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_regional_hostnames_regions_list", + title: "List Regions", + description: "List all Regional Services regions available for use by this account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/dls_identifier", + "description": "Identifier." + } + }, + required: [ + "account_id" + ], + $defs: { + "dls_identifier": dls_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Regions" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/regional_hostnames/regions", + extensions: { + "x-api-token-group": [ + "DNS Read", + "DNS Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/regional_hostnames/regions`, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/regionalHostnames/schemas.ts b/src/generated/forge-mcp/addressing/regionalHostnames/schemas.ts new file mode 100644 index 00000000..ef80eeda --- /dev/null +++ b/src/generated/forge-mcp/addressing/regionalHostnames/schemas.ts @@ -0,0 +1,36 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `dls_hostname`. + */ +export const dls_hostname: JsonSchema = { + "description": "DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com`", + "type": "string" +}; + +/** + * The schema of `dls_identifier`. + */ +export const dls_identifier: JsonSchema = { + "description": "Identifier.", + "type": "string" +}; + +/** + * The schema of `dls_region_key`. + */ +export const dls_region_key: JsonSchema = { + "description": "Identifying key for the region", + "type": "string" +}; + +/** + * The schema of `dls_routing`. + */ +export const dls_routing: JsonSchema = { + "description": "Configure which routing method to use for the regional hostname", + "type": "string" +}; diff --git a/src/generated/forge-mcp/addressing/regionalHostnames/tools.ts b/src/generated/forge-mcp/addressing/regionalHostnames/tools.ts new file mode 100644 index 00000000..c26d1988 --- /dev/null +++ b/src/generated/forge-mcp/addressing/regionalHostnames/tools.ts @@ -0,0 +1,261 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { + dls_hostname, + dls_identifier, + dls_region_key, + dls_routing, +} from "./schemas.js"; + +/** + * The tools of `addressing.regional_hostnames`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_regional_hostnames_create", + title: "Create Regional Hostname", + description: "Create a new Regional Hostname entry. Cloudflare will only use data centers that are physically located within the chosen region to decrypt and service HTTPS traffic. Learn more about [Regional Services](https://developers.cloudflare.com/data-localization/regional-services/get-started/).", + inputSchema: { + type: "object", + properties: { + "body": { + "properties": { + "hostname": { + "$ref": "#/$defs/dls_hostname", + "description": "DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com`" + }, + "region_key": { + "$ref": "#/$defs/dls_region_key", + "description": "Identifying key for the region" + }, + "routing": { + "$ref": "#/$defs/dls_routing", + "default": "dns", + "description": "Configure which routing method to use for the regional hostname" + } + }, + "required": [ + "hostname", + "region_key" + ], + "type": "object" + }, + "zone_id": { + "$ref": "#/$defs/dls_identifier", + "description": "Identifier." + } + }, + required: [ + "zone_id" + ], + $defs: { + "dls_hostname": dls_hostname, + "dls_identifier": dls_identifier, + "dls_region_key": dls_region_key, + "dls_routing": dls_routing, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create Regional Hostname" + }, + method: "POST", + path: "/zones/{zone_id}/addressing/regional_hostnames", + extensions: { + "x-api-token-group": [ + "DNS Write" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/addressing/regional_hostnames`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "addressing_regional_hostnames_delete", + title: "Delete Regional Hostname", + description: "Delete the region configuration for a specific Regional Hostname.", + inputSchema: { + type: "object", + properties: { + "hostname": { + "$ref": "#/$defs/dls_hostname", + "description": "DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com`" + }, + "zone_id": { + "$ref": "#/$defs/dls_identifier", + "description": "Identifier." + } + }, + required: [ + "zone_id", + "hostname" + ], + $defs: { + "dls_hostname": dls_hostname, + "dls_identifier": dls_identifier, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Regional Hostname" + }, + method: "DELETE", + path: "/zones/{zone_id}/addressing/regional_hostnames/{hostname}", + extensions: { + "x-api-token-group": [ + "DNS Write" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/addressing/regional_hostnames/${pathParam(args, "hostname")}`, + }), + }, + { + name: "addressing_regional_hostnames_edit", + title: "Update Regional Hostname", + description: "Update the configuration for a specific Regional Hostname. Only the region_key of a hostname is mutable.", + inputSchema: { + type: "object", + properties: { + "body": { + "properties": { + "region_key": { + "$ref": "#/$defs/dls_region_key", + "description": "Identifying key for the region" + } + }, + "required": [ + "region_key" + ], + "type": "object" + }, + "hostname": { + "$ref": "#/$defs/dls_hostname", + "description": "DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com`" + }, + "zone_id": { + "$ref": "#/$defs/dls_identifier", + "description": "Identifier." + } + }, + required: [ + "zone_id", + "hostname" + ], + $defs: { + "dls_hostname": dls_hostname, + "dls_identifier": dls_identifier, + "dls_region_key": dls_region_key, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update Regional Hostname" + }, + method: "PATCH", + path: "/zones/{zone_id}/addressing/regional_hostnames/{hostname}", + extensions: { + "x-api-token-group": [ + "DNS Write" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/addressing/regional_hostnames/${pathParam(args, "hostname")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "addressing_regional_hostnames_get", + title: "Fetch Regional Hostname", + description: "Fetch the configuration for a specific Regional Hostname, within a zone.", + inputSchema: { + type: "object", + properties: { + "hostname": { + "$ref": "#/$defs/dls_hostname", + "description": "DNS hostname to be regionalized, must be a subdomain of the zone. Wildcards are supported for one level, e.g `*.example.com`" + }, + "zone_id": { + "$ref": "#/$defs/dls_identifier", + "description": "Identifier." + } + }, + required: [ + "zone_id", + "hostname" + ], + $defs: { + "dls_hostname": dls_hostname, + "dls_identifier": dls_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Fetch Regional Hostname" + }, + method: "GET", + path: "/zones/{zone_id}/addressing/regional_hostnames/{hostname}", + extensions: { + "x-api-token-group": [ + "DNS Read", + "DNS Write" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/addressing/regional_hostnames/${pathParam(args, "hostname")}`, + }), + }, + { + name: "addressing_regional_hostnames_list", + title: "List Regional Hostnames", + description: "List all Regional Hostnames within a zone.", + inputSchema: { + type: "object", + properties: { + "zone_id": { + "$ref": "#/$defs/dls_identifier", + "description": "Identifier." + } + }, + required: [ + "zone_id" + ], + $defs: { + "dls_identifier": dls_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Regional Hostnames" + }, + method: "GET", + path: "/zones/{zone_id}/addressing/regional_hostnames", + extensions: { + "x-api-token-group": [ + "DNS Read", + "DNS Write" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/addressing/regional_hostnames`, + }), + }, +]; diff --git a/src/generated/forge-mcp/addressing/schemas.ts b/src/generated/forge-mcp/addressing/schemas.ts new file mode 100644 index 00000000..562c69f7 --- /dev/null +++ b/src/generated/forge-mcp/addressing/schemas.ts @@ -0,0 +1,27 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../_/tool.js"; + +/** + * The schema of `addressing_loa_document_identifier`. + */ +export const addressing_loa_document_identifier: JsonSchema = { + "description": "Identifier for the uploaded LOA document.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] +}; + +/** + * The schema of `addressing_service_identifier`. + */ +export const addressing_service_identifier: JsonSchema = { + "description": "Identifier of a Service on the Cloudflare network. Available services and their IDs may be found in the\n**List Services** endpoint.\n", + "type": "string" +}; diff --git a/src/generated/forge-mcp/addressing/services/tools.ts b/src/generated/forge-mcp/addressing/services/tools.ts new file mode 100644 index 00000000..0fd06a5f --- /dev/null +++ b/src/generated/forge-mcp/addressing/services/tools.ts @@ -0,0 +1,45 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `addressing.services`. + */ +export const tools: readonly Tool[] = [ + { + name: "addressing_services_list", + title: "List Services", + description: "Bring-Your-Own IP (BYOIP) prefixes onboarded to Cloudflare must be bound to a service running on the Cloudflare network to enable a Cloudflare product on the IP addresses. This endpoint can be used as a reference of available services on the Cloudflare network, and their service IDs.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of a Cloudflare account.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Services" + }, + method: "GET", + path: "/accounts/{account_id}/addressing/services", + extensions: { + "x-api-token-group": [ + "IP Prefixes: Write", + "IP Prefixes: Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/addressing/services`, + }), + }, +]; diff --git a/src/generated/forge-mcp/agentMemory/tools.ts b/src/generated/forge-mcp/agentMemory/tools.ts new file mode 100644 index 00000000..bef26c0c --- /dev/null +++ b/src/generated/forge-mcp/agentMemory/tools.ts @@ -0,0 +1,751 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../_/tool.js"; + +/** + * The tools of `agent_memory`. + */ +export const tools: readonly Tool[] = [ + { + name: "agent_memory_create_namespace", + title: "Create a namespace", + description: "Creates a new memory namespace owned by the account.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "body": { + "properties": { + "name": { + "description": "Namespace name.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + } + }, + required: [ + "account_id", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a namespace" + }, + method: "POST", + path: "/accounts/{account_id}/agent-memory/namespaces", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "agent_memory_delete_memory", + title: "Delete a memory", + description: "Deletes a memory by ID. Removes the memory and any source messages linked to it. Returns the deleted memory.\n\nThis method is beta.\n\nConfirm with the user before calling this tool. This operation deletes the memory and any source messages linked to it.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "memory_id": { + "description": "Memory Identifier.", + "type": "string" + }, + "namespace_name": { + "description": "Namespace name.", + "type": "string" + }, + "profile_name": { + "description": "Profile name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace_name", + "profile_name", + "memory_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a memory" + }, + method: "DELETE", + path: "/accounts/{account_id}/agent-memory/namespaces/{namespace_name}/profiles/{profile_name}/memories/{memory_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces/${pathParam(args, "namespace_name")}/profiles/${pathParam(args, "profile_name")}/memories/${pathParam(args, "memory_id")}`, + }), + }, + { + name: "agent_memory_delete_namespace", + title: "Delete a namespace", + description: "Deletes a namespace.\n\nThis method is beta.\n\nConfirm with the user before calling this tool. This operation deletes the namespace along with all memory profiles, memories, and sessions it contains.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "namespace_name": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace_name" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a namespace" + }, + method: "DELETE", + path: "/accounts/{account_id}/agent-memory/namespaces/{namespace_name}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces/${pathParam(args, "namespace_name")}`, + }), + }, + { + name: "agent_memory_delete_profile", + title: "Delete a profile", + description: "Marks a profile for deletion.\n\nThis method is beta.\n\nConfirm with the user before calling this tool. This operation deletes the profile along with all of its memories and messages.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "namespace_name": { + "description": "Namespace name.", + "type": "string" + }, + "profile_name": { + "description": "Profile name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace_name", + "profile_name" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a profile" + }, + method: "DELETE", + path: "/accounts/{account_id}/agent-memory/namespaces/{namespace_name}/profiles/{profile_name}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces/${pathParam(args, "namespace_name")}/profiles/${pathParam(args, "profile_name")}`, + }), + }, + { + name: "agent_memory_delete_session", + title: "Delete a session", + description: "Marks all memories and messages in a profile that are tagged with the given session ID for deletion.\n\nThis method is beta.\n\nConfirm with the user before calling this tool. This operation deletes all memories and messages tagged with this session ID.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "namespace_name": { + "description": "Namespace name.", + "type": "string" + }, + "profile_name": { + "description": "Profile name.", + "type": "string" + }, + "session_id": { + "description": "Session identifier.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace_name", + "profile_name", + "session_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a session" + }, + method: "DELETE", + path: "/accounts/{account_id}/agent-memory/namespaces/{namespace_name}/profiles/{profile_name}/sessions/{session_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces/${pathParam(args, "namespace_name")}/profiles/${pathParam(args, "profile_name")}/sessions/${pathParam(args, "session_id")}`, + }), + }, + { + name: "agent_memory_get_memory", + title: "Get a memory", + description: "Retrieves a memory by ID.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "memory_id": { + "description": "Memory Identifier.", + "type": "string" + }, + "namespace_name": { + "description": "Namespace name.", + "type": "string" + }, + "profile_name": { + "description": "Profile name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace_name", + "profile_name", + "memory_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a memory" + }, + method: "GET", + path: "/accounts/{account_id}/agent-memory/namespaces/{namespace_name}/profiles/{profile_name}/memories/{memory_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces/${pathParam(args, "namespace_name")}/profiles/${pathParam(args, "profile_name")}/memories/${pathParam(args, "memory_id")}`, + }), + }, + { + name: "agent_memory_get_namespace", + title: "Get a namespace", + description: "Gets a namespace by name.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "namespace_name": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace_name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a namespace" + }, + method: "GET", + path: "/accounts/{account_id}/agent-memory/namespaces/{namespace_name}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces/${pathParam(args, "namespace_name")}`, + }), + }, + { + name: "agent_memory_ingest", + title: "Ingest messages", + description: "Processes a conversation and extracts structured memories from it. Agent Memory identifies facts, events, instructions, and tasks automatically.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "body": { + "properties": { + "messages": { + "description": "Conversation messages to extract memories from.", + "items": { + "properties": { + "content": { + "description": "Text content of the message.", + "type": "string" + }, + "role": { + "description": "Author role of the message.", + "enum": [ + "system", + "user", + "assistant" + ], + "type": "string" + }, + "timestamp": { + "description": "Message timestamp.", + "type": "string" + } + }, + "required": [ + "content", + "role" + ], + "type": "object" + }, + "minItems": 1, + "type": "array" + }, + "sessionId": { + "description": "Session identifier.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "messages" + ], + "type": "object" + }, + "namespace_name": { + "description": "Namespace name.", + "type": "string" + }, + "profile_name": { + "description": "Profile name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace_name", + "profile_name", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Ingest messages" + }, + method: "POST", + path: "/accounts/{account_id}/agent-memory/namespaces/{namespace_name}/profiles/{profile_name}/ingest", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces/${pathParam(args, "namespace_name")}/profiles/${pathParam(args, "profile_name")}/ingest`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "agent_memory_list_memories", + title: "List memories", + description: "List memories stored in a profile.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "cursor": { + "description": "Continuation cursor for paginated results.", + "type": "string" + }, + "namespace_name": { + "description": "Namespace name.", + "type": "string" + }, + "per_page": { + "description": "Number of results per page.", + "type": "integer" + }, + "profile_name": { + "description": "Profile name.", + "type": "string" + }, + "session_id": { + "description": "Session identifier for filtering.", + "type": "string" + }, + "type": { + "description": "Memory type for filtering.", + "enum": [ + "fact", + "event", + "instruction", + "task" + ], + "type": "string" + } + }, + required: [ + "account_id", + "namespace_name", + "profile_name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List memories" + }, + method: "GET", + path: "/accounts/{account_id}/agent-memory/namespaces/{namespace_name}/profiles/{profile_name}/memories", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces/${pathParam(args, "namespace_name")}/profiles/${pathParam(args, "profile_name")}/memories`, + query: [ + ["per_page", args["per_page"], true], + ["cursor", args["cursor"], true], + ["session_id", args["session_id"], true], + ["type", args["type"], true], + ], + }), + }, + { + name: "agent_memory_list_namespaces", + title: "List namespaces", + description: "Lists all namespaces for the given account. Results are paginated.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "cursor": { + "description": "Pagination cursor returned by a previous list response.", + "type": "string" + }, + "direction": { + "description": "Direction to sort the results in.", + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "order": { + "description": "Field to order the results by.", + "enum": [ + "id", + "name" + ], + "type": "string" + }, + "per_page": { + "description": "Number of results per page.", + "type": "integer" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List namespaces" + }, + method: "GET", + path: "/accounts/{account_id}/agent-memory/namespaces", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces`, + query: [ + ["per_page", args["per_page"], true], + ["order", args["order"], true], + ["direction", args["direction"], true], + ["cursor", args["cursor"], true], + ], + }), + }, + { + name: "agent_memory_list_profiles", + title: "List profiles", + description: "Lists the profiles of a namespace, ordered by name. A profile appears once it has been used.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "cursor": { + "description": "Opaque continuation cursor returned by a previous list response.", + "type": "string" + }, + "namespace_name": { + "description": "Namespace name.", + "type": "string" + }, + "per_page": { + "description": "Number of results per page.", + "type": "integer" + } + }, + required: [ + "account_id", + "namespace_name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List profiles" + }, + method: "GET", + path: "/accounts/{account_id}/agent-memory/namespaces/{namespace_name}/profiles", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces/${pathParam(args, "namespace_name")}/profiles`, + query: [ + ["per_page", args["per_page"], true], + ["cursor", args["cursor"], true], + ], + }), + }, + { + name: "agent_memory_recall", + title: "Recall memories", + description: "Retrieves memories relevant to the query and returns a synthesized answer.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "body": { + "properties": { + "query": { + "description": "Natural-language query to match against stored memories.", + "type": "string" + }, + "referenceDate": { + "description": "Temporal anchor for relative date references in the query.", + "type": "string" + }, + "responseLength": { + "description": "Verbosity of the synthesized answer. Defaults to 'medium'.", + "enum": [ + "short", + "medium", + "long" + ], + "type": "string" + }, + "thinkingLevel": { + "description": "Recall intensity / search depth. Defaults to 'low'.", + "enum": [ + "low", + "medium", + "high" + ], + "type": "string" + } + }, + "required": [ + "query" + ], + "type": "object" + }, + "namespace_name": { + "description": "Namespace name.", + "type": "string" + }, + "profile_name": { + "description": "Profile name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace_name", + "profile_name", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Recall memories" + }, + method: "POST", + path: "/accounts/{account_id}/agent-memory/namespaces/{namespace_name}/profiles/{profile_name}/recall", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces/${pathParam(args, "namespace_name")}/profiles/${pathParam(args, "profile_name")}/recall`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "agent_memory_remember", + title: "Remember a memory", + description: "Stores a single memory explicitly.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "body": { + "properties": { + "content": { + "description": "Raw memory content to store.", + "type": "string" + }, + "sessionId": { + "description": "Session identifier.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "namespace_name": { + "description": "Namespace name.", + "type": "string" + }, + "profile_name": { + "description": "Profile name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace_name", + "profile_name", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Remember a memory" + }, + method: "POST", + path: "/accounts/{account_id}/agent-memory/namespaces/{namespace_name}/profiles/{profile_name}/remember", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces/${pathParam(args, "namespace_name")}/profiles/${pathParam(args, "profile_name")}/remember`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "agent_memory_summary", + title: "Get a profile summary", + description: "Generates a paste-ready prompt block summarizing everything stored in a memory profile.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare Account ID.", + "type": "string" + }, + "body": { + "properties": { + "sessionId": { + "description": "Session identifier.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, + "namespace_name": { + "description": "Namespace name.", + "type": "string" + }, + "profile_name": { + "description": "Profile name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace_name", + "profile_name", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Get a profile summary" + }, + method: "POST", + path: "/accounts/{account_id}/agent-memory/namespaces/{namespace_name}/profiles/{profile_name}/summary", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/agent-memory/namespaces/${pathParam(args, "namespace_name")}/profiles/${pathParam(args, "profile_name")}/summary`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/ai/authors/tools.ts b/src/generated/forge-mcp/ai/authors/tools.ts new file mode 100644 index 00000000..da7bea00 --- /dev/null +++ b/src/generated/forge-mcp/ai/authors/tools.ts @@ -0,0 +1,60 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai.authors`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_authors_list", + title: "Author Search", + description: "Searches Workers AI models by author or organization name.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Author Search" + }, + method: "GET", + path: "/accounts/{account_id}/ai/authors/search", + extensions: { + "x-api-token-group": [ + "Workers AI Write", + "Workers AI Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/authors/search`, + }), + }, +]; diff --git a/src/generated/forge-mcp/ai/finetunes/assets/tools.ts b/src/generated/forge-mcp/ai/finetunes/assets/tools.ts new file mode 100644 index 00000000..740d9742 --- /dev/null +++ b/src/generated/forge-mcp/ai/finetunes/assets/tools.ts @@ -0,0 +1,117 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `ai.finetunes.assets`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_finetunes_assets_create", + title: "Upload a Finetune Asset", + description: "Uploads training data assets for a Workers AI fine-tuning job.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "finetune_id": { + "type": "string" + } + }, + required: [ + "account_id", + "finetune_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Upload a Finetune Asset" + }, + method: "POST", + path: "/accounts/{account_id}/ai/finetunes/{finetune_id}/finetune-assets", + extensions: { + "x-api-token-group": [ + "Workers AI Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/finetunes/${pathParam(args, "finetune_id")}/finetune-assets`, + }), + }, + { + name: "ai_finetunes_assets_download", + title: "Download a Finetune Asset", + description: "Returns a pre-signed R2 URL for downloading a finetune asset file.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "file_name": { + "type": "string" + }, + "finetune_id": { + "type": "string" + } + }, + required: [ + "account_id", + "finetune_id", + "file_name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Download a Finetune Asset" + }, + method: "GET", + path: "/accounts/{account_id}/ai/finetunes/{finetune_id}/finetune-assets/{file_name}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/finetunes/${pathParam(args, "finetune_id")}/finetune-assets/${pathParam(args, "file_name")}`, + }), + }, +]; diff --git a/src/generated/forge-mcp/ai/finetunes/public/tools.ts b/src/generated/forge-mcp/ai/finetunes/public/tools.ts new file mode 100644 index 00000000..25d12f15 --- /dev/null +++ b/src/generated/forge-mcp/ai/finetunes/public/tools.ts @@ -0,0 +1,79 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `ai.finetunes.public`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_finetunes_public_list", + title: "List Public Finetunes", + description: "Lists publicly available fine-tuned models that can be used with Workers AI.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "limit": { + "default": 20, + "description": "Pagination Limit.", + "type": "number" + }, + "offset": { + "default": 0, + "description": "Pagination Offset.", + "type": "number" + }, + "order_by": { + "description": "Order By Column Name.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Public Finetunes" + }, + method: "GET", + path: "/accounts/{account_id}/ai/finetunes/public", + extensions: { + "x-api-token-group": [ + "Workers AI Write", + "Workers AI Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/finetunes/public`, + query: [ + ["limit", args["limit"], true], + ["offset", args["offset"], true], + ["orderBy", args["order_by"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/ai/finetunes/tools.ts b/src/generated/forge-mcp/ai/finetunes/tools.ts new file mode 100644 index 00000000..7efb2fdf --- /dev/null +++ b/src/generated/forge-mcp/ai/finetunes/tools.ts @@ -0,0 +1,182 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai.finetunes`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_finetunes_create", + title: "Create a new Finetune", + description: "Creates a new fine-tuning job for a Workers AI model using custom training data.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "description": { + "type": "string" + }, + "model": { + "type": "string" + }, + "name": { + "type": "string" + }, + "public": { + "default": false, + "type": "boolean" + } + }, + "required": [ + "model", + "name" + ], + "type": "object" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a new Finetune" + }, + method: "POST", + path: "/accounts/{account_id}/ai/finetunes", + extensions: { + "x-api-token-group": [ + "Workers AI Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/finetunes`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_finetunes_delete", + title: "Delete a Finetune", + description: "Delete a finetune. Any in-flight requests referencing the lora will fail after the files are deleted.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "finetune_id": { + "type": "string" + } + }, + required: [ + "account_id", + "finetune_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a Finetune" + }, + method: "DELETE", + path: "/accounts/{account_id}/ai/finetunes/{finetune_id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/finetunes/${pathParam(args, "finetune_id")}`, + }), + }, + { + name: "ai_finetunes_list", + title: "List Finetunes", + description: "Lists all fine-tuning jobs created by the account, including status and metrics.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Finetunes" + }, + method: "GET", + path: "/accounts/{account_id}/ai/finetunes", + extensions: { + "x-api-token-group": [ + "Workers AI Write", + "Workers AI Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/finetunes`, + }), + }, +]; diff --git a/src/generated/forge-mcp/ai/models/tools.ts b/src/generated/forge-mcp/ai/models/tools.ts new file mode 100644 index 00000000..83eb31bd --- /dev/null +++ b/src/generated/forge-mcp/ai/models/tools.ts @@ -0,0 +1,115 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai.models`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_models_list", + title: "Model Search", + description: "Searches Workers AI models by name or description.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "author": { + "default": "", + "description": "Filter by Author.", + "type": "string" + }, + "format": { + "description": "If set, return models in the requested marketplace format instead of the default response.", + "enum": [ + "openrouter" + ], + "type": "string" + }, + "hide_experimental": { + "default": false, + "description": "Filter to hide experimental models.", + "type": "boolean" + }, + "include_deprecated": { + "default": false, + "description": "If true, include models for up to three months after their deprecation date. Defaults to false.", + "type": "boolean" + }, + "page": { + "default": 1, + "type": "integer" + }, + "per_page": { + "default": 100, + "type": "integer" + }, + "search": { + "default": "", + "description": "Search.", + "type": "string" + }, + "source": { + "description": "Filter by Source Id.", + "type": "number" + }, + "task": { + "default": "", + "description": "Filter by Task Name.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Model Search" + }, + method: "GET", + path: "/accounts/{account_id}/ai/models/search", + extensions: { + "x-api-token-group": [ + "Workers AI Write", + "Workers AI Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/models/search`, + query: [ + ["per_page", args["per_page"], true], + ["page", args["page"], true], + ["task", args["task"], true], + ["author", args["author"], true], + ["source", args["source"], true], + ["hide_experimental", args["hide_experimental"], true], + ["search", args["search"], true], + ["include_deprecated", args["include_deprecated"], true], + ["format", args["format"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/ai/tasks/tools.ts b/src/generated/forge-mcp/ai/tasks/tools.ts new file mode 100644 index 00000000..5d126ba7 --- /dev/null +++ b/src/generated/forge-mcp/ai/tasks/tools.ts @@ -0,0 +1,60 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai.tasks`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_tasks_list", + title: "Task Search", + description: "Searches Workers AI models by task type (e.g., text-generation, embeddings).", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Task Search" + }, + method: "GET", + path: "/accounts/{account_id}/ai/tasks/search", + extensions: { + "x-api-token-group": [ + "Workers AI Write", + "Workers AI Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/tasks/search`, + }), + }, +]; diff --git a/src/generated/forge-mcp/ai/tools.ts b/src/generated/forge-mcp/ai/tools.ts new file mode 100644 index 00000000..7ff4f37d --- /dev/null +++ b/src/generated/forge-mcp/ai/tools.ts @@ -0,0 +1,1202 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../_/tool.js"; + +/** + * The tools of `ai`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_get_model_schema", + title: "Get an AI model's input and output schemas", + description: "Retrieves the input and output JSON Schema definitions for an AI model. Use these definitions to determine the model-specific request fields and response format.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID used for this AI model request.", + "type": "string" + }, + "model": { + "description": "AI model identifier, including its namespace and model name.", + "type": "string" + } + }, + required: [ + "account_id", + "model" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get an AI model's input and output schemas" + }, + method: "GET", + path: "/accounts/{account_id}/ai/models/schema", + extensions: { + "x-api-token-group": [ + "Workers AI Write", + "Workers AI Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/models/schema`, + query: [ + ["model", args["model"], true], + ], + }), + }, + { + name: "ai_list_markdown_supported_formats", + title: "List supported Markdown conversion formats", + description: "Lists the file extensions and MIME types accepted by Workers AI's Markdown conversion endpoint. Use this list to check whether a file can be converted before uploading it.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID used for this AI model request.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List supported Markdown conversion formats" + }, + method: "GET", + path: "/accounts/{account_id}/ai/tomarkdown/supported", + extensions: { + "x-api-token-group": [ + "Workers AI Write", + "Workers AI Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/tomarkdown/supported`, + }), + }, + { + name: "ai_run", + title: "Run an AI model with request options", + description: "Runs an AI model using a JSON body containing model, input, and optional options fields. Unlike the model-specific URL endpoint, this endpoint takes the model identifier in the body and nests the model's inputs under input.\n\nUse options.extraHeaders to pass additional provider headers. Accepts Workers AI model identifiers and AI Gateway provider model identifiers.\n\nSee the [Workers AI model catalog](https://developers.cloudflare.com/workers-ai/models/) for Workers AI model inputs, or the provider's documentation for models accessed through AI Gateway.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID used for this AI model request.", + "type": "string" + }, + "body": { + "properties": { + "input": { + "description": "JSON object containing the selected model's input fields, such as prompt or messages. Do not include model or options inside this object.", + "type": "object" + }, + "model": { + "description": "The AI model to execute (e.g., @cf/google/gemma-4-26b-a4b-it, openai/gpt-5.5, anthropic/claude-opus-4.7)", + "type": "string" + }, + "options": { + "properties": { + "extraHeaders": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional headers to pass to the AI provider", + "type": "object" + }, + "gateway": { + "properties": { + "cacheTtl": { + "description": "Cache TTL in seconds", + "type": "number" + }, + "id": { + "description": "AI Gateway ID for caching and logging", + "type": "string" + }, + "skipCache": { + "description": "Skip cache lookup for this request", + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "required": [ + "input", + "model" + ], + "type": "object" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Run an AI model with request options" + }, + method: "POST", + path: "/accounts/{account_id}/ai/run", + extensions: { + "x-api-token-group": [ + "Workers AI Write", + "Workers AI Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/run`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_run_model", + title: "Run a Workers AI model", + description: "Runs the Workers AI model specified in the URL path. Send the model's inputs directly in the request body, without a model/input/options wrapper.\n\nAccepts model-specific JSON or binary input. The response format depends on the model and the requested output.\n\nSee the [model catalog](https://developers.cloudflare.com/workers-ai/models/) for supported models and their input formats.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID used for this AI model request.", + "type": "string" + }, + "body": { + "oneOf": [ + { + "properties": { + "text": { + "description": "The text that you want to classify", + "type": "string" + } + }, + "required": [ + "text" + ], + "type": "object" + }, + { + "properties": { + "guidance": { + "default": 7.5, + "description": "Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt", + "type": "number" + }, + "height": { + "description": "The height of the generated image in pixels", + "type": "integer" + }, + "image": { + "description": "For use with img2img tasks. An array of integers that represent the image data constrained to 8-bit unsigned integer values", + "items": { + "type": "number" + }, + "type": "array" + }, + "image_b64": { + "description": "For use with img2img tasks. A base64-encoded string of the input image", + "type": "string" + }, + "mask": { + "description": "An array representing An array of integers that represent mask image data for inpainting constrained to 8-bit unsigned integer values", + "items": { + "type": "number" + }, + "type": "array" + }, + "negative_prompt": { + "description": "Text describing elements to avoid in the generated image", + "type": "string" + }, + "num_steps": { + "default": 20, + "description": "The number of diffusion steps; higher values can improve quality but take longer", + "type": "integer" + }, + "prompt": { + "description": "A text description of the image you want to generate", + "type": "string" + }, + "seed": { + "description": "Random seed for reproducibility of the image generation", + "type": "integer" + }, + "strength": { + "default": 1, + "description": "A value between 0 and 1 indicating how strongly to apply the transformation during img2img tasks; lower values make the output closer to the input image", + "type": "number" + }, + "width": { + "description": "The width of the generated image in pixels", + "type": "integer" + } + }, + "required": [ + "prompt" + ], + "type": "object" + }, + { + "properties": { + "lang": { + "default": "en", + "description": "The speech language (e.g., 'en' for English, 'fr' for French). Defaults to 'en' if not specified", + "type": "string" + }, + "prompt": { + "description": "A text description of the audio you want to generate", + "type": "string" + } + }, + "required": [ + "prompt" + ], + "type": "object" + }, + { + "properties": { + "text": { + "oneOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "maxItems": 100, + "type": "array" + } + ] + } + }, + "required": [ + "text" + ], + "type": "object" + }, + { + "format": "binary", + "type": "string" + }, + { + "properties": { + "audio": { + "description": "An array of integers that represent the audio data constrained to 8-bit unsigned integer values", + "items": { + "type": "number" + }, + "type": "array" + }, + "source_lang": { + "description": "The language of the recorded audio", + "type": "string" + }, + "target_lang": { + "description": "The language to translate the transcription into. Currently only English is supported.", + "type": "string" + } + }, + "required": [ + "audio" + ], + "type": "object" + }, + { + "properties": { + "image": { + "description": "An array of integers that represent the image data constrained to 8-bit unsigned integer values", + "items": { + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "image" + ], + "type": "object" + }, + { + "properties": { + "image": { + "description": "An array of integers that represent the image data constrained to 8-bit unsigned integer values", + "items": { + "type": "number" + }, + "type": "array" + } + }, + "type": "object" + }, + { + "properties": { + "frequency_penalty": { + "description": "Decreases the likelihood of the model repeating the same lines verbatim.", + "type": "number" + }, + "lora": { + "description": "Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.", + "type": "string" + }, + "max_tokens": { + "default": 256, + "description": "The maximum number of tokens to generate in the response.", + "type": "integer" + }, + "presence_penalty": { + "description": "Increases the likelihood of the model introducing new topics.", + "type": "number" + }, + "prompt": { + "description": "The input text prompt for the model to generate a response.", + "type": "string" + }, + "raw": { + "default": false, + "description": "If true, a chat template is not applied and you must adhere to the specific model's expected formatting.", + "type": "boolean" + }, + "repetition_penalty": { + "description": "Penalty for repeated tokens; higher values discourage repetition.", + "type": "number" + }, + "response_format": { + "properties": { + "json_schema": {}, + "type": { + "enum": [ + "json_object", + "json_schema" + ], + "type": "string" + } + }, + "type": "object" + }, + "seed": { + "description": "Random seed for reproducibility of the generation.", + "type": "integer" + }, + "stream": { + "default": false, + "description": "If true, the response will be streamed back incrementally using SSE, Server Sent Events.", + "type": "boolean" + }, + "temperature": { + "default": 0.6, + "description": "Controls the randomness of the output; higher values produce more random results.", + "type": "number" + }, + "top_k": { + "description": "Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.", + "type": "integer" + }, + "top_p": { + "description": "Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.", + "type": "number" + } + }, + "required": [ + "prompt" + ], + "type": "object" + }, + { + "properties": { + "frequency_penalty": { + "description": "Decreases the likelihood of the model repeating the same lines verbatim.", + "type": "number" + }, + "functions": { + "items": { + "properties": { + "code": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "code", + "name" + ], + "type": "object" + }, + "type": "array" + }, + "max_tokens": { + "default": 256, + "description": "The maximum number of tokens to generate in the response.", + "type": "integer" + }, + "messages": { + "description": "An array of message objects representing the conversation history.", + "items": { + "properties": { + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "items": { + "properties": { + "text": { + "description": "Text content", + "type": "string" + }, + "type": { + "description": "Type of the content (text)", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + ] + }, + "role": { + "description": "The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').", + "type": "string" + } + }, + "required": [ + "content", + "role" + ], + "type": "object" + }, + "type": "array" + }, + "presence_penalty": { + "description": "Increases the likelihood of the model introducing new topics.", + "type": "number" + }, + "raw": { + "default": false, + "description": "If true, a chat template is not applied and you must adhere to the specific model's expected formatting.", + "type": "boolean" + }, + "repetition_penalty": { + "description": "Penalty for repeated tokens; higher values discourage repetition.", + "type": "number" + }, + "response_format": { + "properties": { + "json_schema": {}, + "type": { + "enum": [ + "json_object", + "json_schema" + ], + "type": "string" + } + }, + "type": "object" + }, + "seed": { + "description": "Random seed for reproducibility of the generation.", + "type": "integer" + }, + "stream": { + "default": false, + "description": "If true, the response will be streamed back incrementally using SSE, Server Sent Events.", + "type": "boolean" + }, + "temperature": { + "default": 0.6, + "description": "Controls the randomness of the output; higher values produce more random results.", + "type": "number" + }, + "tools": { + "description": "A list of tools available for the assistant to use.", + "items": { + "oneOf": [ + { + "properties": { + "description": { + "description": "A brief description of what the tool does.", + "type": "string" + }, + "name": { + "description": "The name of the tool. More descriptive the better.", + "type": "string" + }, + "parameters": { + "description": "Schema defining the parameters accepted by the tool.", + "properties": { + "properties": { + "additionalProperties": { + "properties": { + "description": { + "description": "A description of the expected parameter.", + "type": "string" + }, + "type": { + "description": "The data type of the parameter.", + "type": "string" + } + }, + "required": [ + "description", + "type" + ], + "type": "object" + }, + "description": "Definitions of each parameter.", + "type": "object" + }, + "required": { + "description": "List of required parameter names.", + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "The type of the parameters object (usually 'object').", + "type": "string" + } + }, + "required": [ + "properties", + "type" + ], + "type": "object" + } + }, + "required": [ + "description", + "name", + "parameters" + ], + "type": "object" + }, + { + "properties": { + "function": { + "description": "Details of the function tool.", + "properties": { + "description": { + "description": "A brief description of what the function does.", + "type": "string" + }, + "name": { + "description": "The name of the function.", + "type": "string" + }, + "parameters": { + "description": "Schema defining the parameters accepted by the function.", + "properties": { + "properties": { + "additionalProperties": { + "properties": { + "description": { + "description": "A description of the expected parameter.", + "type": "string" + }, + "type": { + "description": "The data type of the parameter.", + "type": "string" + } + }, + "required": [ + "description", + "type" + ], + "type": "object" + }, + "description": "Definitions of each parameter.", + "type": "object" + }, + "required": { + "description": "List of required parameter names.", + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "The type of the parameters object (usually 'object').", + "type": "string" + } + }, + "required": [ + "properties", + "type" + ], + "type": "object" + } + }, + "required": [ + "description", + "name", + "parameters" + ], + "type": "object" + }, + "type": { + "description": "Specifies the type of tool (e.g., 'function').", + "type": "string" + } + }, + "required": [ + "function", + "type" + ], + "type": "object" + } + ] + }, + "type": "array" + }, + "top_k": { + "description": "Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.", + "type": "integer" + }, + "top_p": { + "description": "Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.", + "type": "number" + } + }, + "required": [ + "messages" + ], + "type": "object" + }, + { + "properties": { + "source_lang": { + "default": "en", + "description": "The language code of the source text (e.g., 'en' for English). Defaults to 'en' if not specified", + "type": "string" + }, + "target_lang": { + "description": "The language code to translate the text into (e.g., 'es' for Spanish)", + "type": "string" + }, + "text": { + "description": "The text to be translated", + "type": "string" + } + }, + "required": [ + "target_lang", + "text" + ], + "type": "object" + }, + { + "properties": { + "input_text": { + "description": "The text that you want the model to summarize", + "type": "string" + }, + "max_length": { + "default": 1024, + "description": "The maximum length of the generated summary in tokens", + "type": "integer" + } + }, + "required": [ + "input_text" + ], + "type": "object" + }, + { + "properties": { + "frequency_penalty": { + "description": "Decreases the likelihood of the model repeating the same lines verbatim.", + "type": "number" + }, + "image": { + "oneOf": [ + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "format": "binary", + "type": "string" + } + ] + }, + "max_tokens": { + "default": 512, + "description": "The maximum number of tokens to generate in the response.", + "type": "integer" + }, + "presence_penalty": { + "description": "Increases the likelihood of the model introducing new topics.", + "type": "number" + }, + "prompt": { + "description": "The input text prompt for the model to generate a response.", + "type": "string" + }, + "raw": { + "default": false, + "description": "If true, a chat template is not applied and you must adhere to the specific model's expected formatting.", + "type": "boolean" + }, + "repetition_penalty": { + "description": "Penalty for repeated tokens; higher values discourage repetition.", + "type": "number" + }, + "seed": { + "description": "Random seed for reproducibility of the generation.", + "type": "number" + }, + "temperature": { + "description": "Controls the randomness of the output; higher values produce more random results.", + "type": "number" + }, + "top_k": { + "description": "Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.", + "type": "number" + }, + "top_p": { + "description": "Controls the creativity of the AI's responses by adjusting how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.", + "type": "number" + } + }, + "required": [ + "image" + ], + "type": "object" + }, + { + "properties": { + "frequency_penalty": { + "description": "Decreases the likelihood of the model repeating the same lines verbatim.", + "type": "number" + }, + "ignore_eos": { + "description": "Whether to ignore the EOS token and continue generating tokens after the EOS token is generated.", + "type": "boolean" + }, + "image": { + "description": "Image in base64 encoded format.", + "type": "string" + }, + "max_tokens": { + "default": 512, + "description": "The maximum number of tokens to generate in the response.", + "type": "integer" + }, + "presence_penalty": { + "description": "Increases the likelihood of the model introducing new topics.", + "type": "number" + }, + "prompt": { + "description": "The input text prompt for the model to generate a response.", + "type": "string" + }, + "repetition_penalty": { + "description": "Penalty for repeated tokens; higher values discourage repetition.", + "type": "number" + }, + "seed": { + "description": "Random seed for reproducibility of the generation.", + "type": "number" + }, + "temperature": { + "description": "Controls the randomness of the output; higher values produce more random results.", + "type": "number" + }, + "top_k": { + "description": "Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.", + "type": "number" + }, + "top_p": { + "description": "Controls the creativity of the AI's responses by adjusting how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.", + "type": "number" + } + }, + "required": [ + "image", + "prompt" + ], + "type": "object" + }, + { + "properties": { + "frequency_penalty": { + "description": "Decreases the likelihood of the model repeating the same lines verbatim.", + "type": "number" + }, + "ignore_eos": { + "description": "Whether to ignore the EOS token and continue generating tokens after the EOS token is generated.", + "type": "boolean" + }, + "image": { + "description": "Image in base64 encoded format.", + "type": "string" + }, + "max_tokens": { + "default": 512, + "description": "The maximum number of tokens to generate in the response.", + "type": "integer" + }, + "messages": { + "description": "An array of message objects representing the conversation history.", + "items": { + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "properties": { + "image_url": { + "description": "Image URL object (when type is 'image_url').", + "properties": { + "url": { + "description": "Image URI with data (e.g. data:image/jpeg;base64,/9j/...).", + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "text": { + "description": "Text content (when type is 'text').", + "type": "string" + }, + "type": { + "description": "Type of the content part (e.g. 'text', 'image_url').", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "type": "array" + } + ] + }, + "role": { + "description": "The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').", + "type": "string" + } + }, + "required": [ + "content", + "role" + ], + "type": "object" + }, + "type": "array" + }, + "presence_penalty": { + "description": "Increases the likelihood of the model introducing new topics.", + "type": "number" + }, + "repetition_penalty": { + "description": "Penalty for repeated tokens; higher values discourage repetition.", + "type": "number" + }, + "seed": { + "description": "Random seed for reproducibility of the generation.", + "type": "number" + }, + "temperature": { + "description": "Controls the randomness of the output; higher values produce more random results.", + "type": "number" + }, + "top_k": { + "description": "Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.", + "type": "number" + }, + "top_p": { + "description": "Controls the creativity of the AI's responses by adjusting how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.", + "type": "number" + } + }, + "required": [ + "image", + "messages" + ], + "type": "object" + }, + { + "properties": { + "image": { + "description": "Image in base64 encoded format.", + "type": "string" + }, + "text": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + } + ] + }, + "model_name": { + "description": "Workers AI model identifier, including its namespace and model name.", + "type": "string" + } + }, + required: [ + "account_id", + "model_name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Run a Workers AI model" + }, + method: "POST", + path: "/accounts/{account_id}/ai/run/{model_name}", + extensions: { + "x-api-token-group": [ + "Workers AI Write", + "Workers AI Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-fern-audiences": [ + "sdk" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/run/${pathParam(args, "model_name")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_to_markdown", + title: "Convert uploaded files to Markdown", + description: "Converts files uploaded as multipart form data into Markdown using Workers AI. Returns a conversion result for each file. Use the supported-formats endpoint to check accepted file types.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID used for this AI model request.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Convert uploaded files to Markdown" + }, + method: "POST", + path: "/accounts/{account_id}/ai/tomarkdown", + extensions: { + "x-api-token-group": [ + "Workers AI Write", + "Workers AI Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/tomarkdown`, + }), + }, + { + name: "ai_websearch", + title: "Search the web through AI Gateway", + description: "Run a web search through a configured AI Gateway.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "byokAlias": { + "type": "string" + }, + "limit": { + "type": "integer" + }, + "options": { + "properties": { + "gateway": { + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + } + }, + "required": [ + "gateway" + ], + "type": "object" + }, + "provider": { + "type": "string" + }, + "query": { + "type": "string" + } + }, + "required": [ + "options", + "query" + ], + "type": "object" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Search the web through AI Gateway" + }, + method: "POST", + path: "/accounts/{account_id}/ai/websearch", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai": { + "name": "com_cloudflare_api_account_ai" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai/websearch`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiAudit/robots/tools.ts b/src/generated/forge-mcp/aiAudit/robots/tools.ts new file mode 100644 index 00000000..f3e4ce20 --- /dev/null +++ b/src/generated/forge-mcp/aiAudit/robots/tools.ts @@ -0,0 +1,96 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai_audit.robots`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_audit_robots_bulk_get", + title: "Bulk get robots.txt rules", + description: "Fetches and parses robots.txt files for multiple domains within a zone in a single request. Each domain must belong to the specified zone. Results are keyed by hostname.", + inputSchema: { + type: "object", + properties: { + "body": { + "items": { + "type": "string" + }, + "maxItems": 25, + "type": "array" + }, + "zone_id": { + "description": "Identifier of the zone.", + "type": "string" + } + }, + required: [ + "zone_id", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Bulk get robots.txt rules" + }, + method: "POST", + path: "/zones/{zone_id}/ai-audit/robots/bulk", + extensions: { + "x-api-token-group": [ + "Zone Settings Write", + "Zone Settings Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/ai-audit/robots/bulk`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_audit_robots_get", + title: "Get robots.txt rules", + description: "Fetches and parses the robots.txt file for a zone or a specific subdomain within the zone. Returns parsed user-agent rules, content signals, and sitemaps.", + inputSchema: { + type: "object", + properties: { + "subdomain": { + "description": "Optional subdomain to fetch robots.txt for. If omitted, fetches robots.txt for the zone apex domain.", + "type": "string" + }, + "zone_id": { + "description": "Identifier of the zone.", + "type": "string" + } + }, + required: [ + "zone_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get robots.txt rules" + }, + method: "GET", + path: "/zones/{zone_id}/ai-audit/robots", + extensions: { + "x-api-token-group": [ + "Zone Settings Write", + "Zone Settings Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/ai-audit/robots`, + query: [ + ["subdomain", args["subdomain"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/aiGateway/customDomains/tools.ts b/src/generated/forge-mcp/aiGateway/customDomains/tools.ts new file mode 100644 index 00000000..2712c29a --- /dev/null +++ b/src/generated/forge-mcp/aiGateway/customDomains/tools.ts @@ -0,0 +1,293 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai_gateway.custom_domains`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_gateway_custom_domains_create", + title: "Create a custom domain for a gateway", + description: "Provisions a Cloudflare-for-SaaS custom hostname and returns the CNAME target to point DNS at.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "domain": { + "description": "Custom hostname that you own, such as `ai.example.com`.", + "type": "string" + }, + "minTLS": { + "enum": [ + "1.0", + "1.1", + "1.2", + "1.3" + ], + "type": "string" + }, + "zone_id": { + "description": "ID of the Cloudflare zone that contains the custom hostname.", + "type": "string" + } + }, + "required": [ + "domain", + "zone_id" + ], + "type": "object" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a custom domain for a gateway" + }, + method: "POST", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/custom-domains", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/custom-domains`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_gateway_custom_domains_delete", + title: "Delete a custom domain", + description: "Deletes a custom domain from an AI Gateway and removes its Cloudflare for SaaS custom hostname.\n\nConfirm with the user before calling this tool. This deletes the custom domain and its custom hostname. Requests to this hostname will stop reaching the gateway.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "hostname": { + "description": "Custom hostname that you own, such as `ai.example.com`.", + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "hostname" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a custom domain" + }, + method: "DELETE", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/custom-domains/{hostname}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/custom-domains/${pathParam(args, "hostname")}`, + }), + }, + { + name: "ai_gateway_custom_domains_get", + title: "Get a custom domain", + description: "Retrieves a custom domain attached to an AI Gateway, including its status and CNAME target.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "hostname": { + "description": "Custom hostname that you own, such as `ai.example.com`.", + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "hostname" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a custom domain" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/custom-domains/{hostname}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/custom-domains/${pathParam(args, "hostname")}`, + }), + }, + { + name: "ai_gateway_custom_domains_list", + title: "List custom domains", + description: "Lists the custom domains attached to an AI Gateway, including the certificate and validation status of each domain.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "page": { + "default": 1, + "type": "integer" + }, + "per_page": { + "default": 20, + "type": "integer" + }, + "search": { + "description": "Search by hostname", + "type": "string" + }, + "status": { + "enum": [ + "initializing", + "pending_dcv", + "active", + "blocked", + "error" + ], + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List custom domains" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/custom-domains", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/custom-domains`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["status", args["status"], true], + ["search", args["search"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/aiGateway/customProviders/tools.ts b/src/generated/forge-mcp/aiGateway/customProviders/tools.ts new file mode 100644 index 00000000..1362b66c --- /dev/null +++ b/src/generated/forge-mcp/aiGateway/customProviders/tools.ts @@ -0,0 +1,422 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai_gateway.custom_providers`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_gateway_custom_providers_create", + title: "Create a custom provider", + description: "Creates an account-level custom provider that forwards AI Gateway requests to the HTTPS base URL you supply. Requests reference the provider as `custom-{slug}`, so the slug must be unique within the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "base_url": { + "type": "string" + }, + "beta": { + "type": "boolean" + }, + "curl_example": { + "type": "string" + }, + "description": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "headers": { + "description": "JSON object of extra HTTP headers that AI Gateway sends to the provider. Values can contain credentials.", + "type": "string" + }, + "js_example": { + "type": "string" + }, + "link": { + "type": "string" + }, + "name": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "slug": { + "type": "string" + } + }, + "required": [ + "base_url", + "name", + "slug" + ], + "type": "object" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a custom provider" + }, + method: "POST", + path: "/accounts/{account_id}/ai-gateway/custom-providers", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "beta": { + "hidden": true + }, + "curl_example": { + "hidden": true + }, + "js_example": { + "hidden": true + }, + "link": { + "hidden": true + }, + "position": { + "hidden": true + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/custom-providers`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_gateway_custom_providers_delete", + title: "Delete a custom provider", + description: "Deletes a custom provider and every pricing rule that belongs to it.\n\nConfirm with the user before calling this tool. This permanently deletes the custom provider and all of its pricing rules. Gateway requests that use `custom-{slug}` for this provider will stop routing.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "id": { + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a custom provider" + }, + method: "DELETE", + path: "/accounts/{account_id}/ai-gateway/custom-providers/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/custom-providers/${pathParam(args, "id")}`, + }), + }, + { + name: "ai_gateway_custom_providers_get", + title: "Get a custom provider", + description: "Retrieves a custom provider, including its slug, base URL, and custom headers.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "id": { + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a custom provider" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/custom-providers/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/custom-providers/${pathParam(args, "id")}`, + }), + }, + { + name: "ai_gateway_custom_providers_list", + title: "List custom providers", + description: "Lists the custom providers configured for the account, ordered by position and then name.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "beta": { + "type": "boolean" + }, + "enable": { + "type": "boolean" + }, + "page": { + "default": 1, + "type": "integer" + }, + "per_page": { + "default": 20, + "type": "integer" + }, + "search": { + "description": "Search by id, name, slug", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List custom providers" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/custom-providers", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/custom-providers`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["beta", args["beta"], true], + ["enable", args["enable"], true], + ["search", args["search"], true], + ], + }), + }, + { + name: "ai_gateway_custom_providers_update", + title: "Update a custom provider", + description: "Updates the specified fields of a custom provider. Changes clear cached entries for the provider.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "base_url": { + "type": "string" + }, + "beta": { + "type": "boolean" + }, + "curl_example": { + "type": "string" + }, + "description": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "headers": { + "description": "JSON object of extra HTTP headers that AI Gateway sends to the provider. Values can contain credentials.", + "type": "string" + }, + "js_example": { + "type": "string" + }, + "link": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "name": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "slug": { + "type": "string" + } + }, + "type": "object" + }, + "id": { + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update a custom provider" + }, + method: "PATCH", + path: "/accounts/{account_id}/ai-gateway/custom-providers/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "beta": { + "hidden": true + }, + "curl_example": { + "hidden": true + }, + "js_example": { + "hidden": true + }, + "link": { + "hidden": true + }, + "logo": { + "hidden": true + }, + "position": { + "hidden": true + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/custom-providers/${pathParam(args, "id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiGateway/datasets/tools.ts b/src/generated/forge-mcp/aiGateway/datasets/tools.ts new file mode 100644 index 00000000..8d5ef137 --- /dev/null +++ b/src/generated/forge-mcp/aiGateway/datasets/tools.ts @@ -0,0 +1,465 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai_gateway.datasets`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_gateway_datasets_create", + title: "Create a dataset (deprecated)", + description: "Creates a dataset that selects gateway logs matching the specified filters for use in evaluations. Evaluations and datasets are deprecated and unavailable to new accounts.\n\nThis method is deprecated.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "enable": { + "type": "boolean" + }, + "filters": { + "items": { + "properties": { + "key": { + "enum": [ + "created_at", + "request_content_type", + "response_content_type", + "success", + "cached", + "provider", + "model", + "cost", + "tokens", + "tokens_in", + "tokens_out", + "duration", + "feedback" + ], + "type": "string" + }, + "operator": { + "enum": [ + "eq", + "contains", + "lt", + "gt" + ], + "type": "string" + }, + "value": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "type": "array" + } + }, + "required": [ + "key", + "operator", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "name": { + "type": "string" + } + }, + "required": [ + "enable", + "filters", + "name" + ], + "type": "object" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a dataset (deprecated)" + }, + method: "POST", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/datasets`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_gateway_datasets_delete", + title: "Delete a dataset (deprecated)", + description: "Deletes a dataset. Evaluations and datasets are deprecated and unavailable to new accounts.\n\nThis method is deprecated.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a dataset (deprecated)" + }, + method: "DELETE", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/datasets/${pathParam(args, "id")}`, + }), + }, + { + name: "ai_gateway_datasets_get", + title: "Get a dataset (deprecated)", + description: "Retrieves a dataset and its log filters. Evaluations and datasets are deprecated and unavailable to new accounts.\n\nThis method is deprecated.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a dataset (deprecated)" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/datasets/${pathParam(args, "id")}`, + }), + }, + { + name: "ai_gateway_datasets_list", + title: "List datasets (deprecated)", + description: "Lists the datasets defined for an AI Gateway. Evaluations and datasets are deprecated and unavailable to new accounts.\n\nThis method is deprecated.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "enable": { + "type": "boolean" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "name": { + "type": "string" + }, + "page": { + "default": 1, + "type": "integer" + }, + "per_page": { + "default": 20, + "type": "integer" + }, + "search": { + "description": "Search by id, name, filters", + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List datasets (deprecated)" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/datasets`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["name", args["name"], true], + ["enable", args["enable"], true], + ["search", args["search"], true], + ], + }), + }, + { + name: "ai_gateway_datasets_update", + title: "Update a dataset (deprecated)", + description: "Replaces the name, log filters, and enabled state of a dataset. Evaluations and datasets are deprecated and unavailable to new accounts.\n\nThis method is deprecated.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "enable": { + "type": "boolean" + }, + "filters": { + "items": { + "properties": { + "key": { + "enum": [ + "created_at", + "request_content_type", + "response_content_type", + "success", + "cached", + "provider", + "model", + "cost", + "tokens", + "tokens_in", + "tokens_out", + "duration", + "feedback" + ], + "type": "string" + }, + "operator": { + "enum": [ + "eq", + "contains", + "lt", + "gt" + ], + "type": "string" + }, + "value": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "type": "array" + } + }, + "required": [ + "key", + "operator", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "name": { + "type": "string" + } + }, + "required": [ + "enable", + "filters", + "name" + ], + "type": "object" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update a dataset (deprecated)" + }, + method: "PUT", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/datasets/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/datasets/${pathParam(args, "id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiGateway/dynamicRouting/deployments/tools.ts b/src/generated/forge-mcp/aiGateway/dynamicRouting/deployments/tools.ts new file mode 100644 index 00000000..ebf28f25 --- /dev/null +++ b/src/generated/forge-mcp/aiGateway/dynamicRouting/deployments/tools.ts @@ -0,0 +1,137 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `ai_gateway.dynamic_routing.deployments`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_gateway_dynamic_routing_deployments_create", + title: "Deploy a dynamic route version", + description: "Deploys the specified version of a dynamic route so that it serves traffic. Deploy an earlier version to roll back.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "version_id": { + "type": "string" + } + }, + "required": [ + "version_id" + ], + "type": "object" + }, + "gateway_id": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Deploy a dynamic route version" + }, + method: "POST", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/deployments", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/routes/${pathParam(args, "id")}/deployments`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_gateway_dynamic_routing_deployments_list", + title: "List dynamic route deployments", + description: "Lists the deployment history of a dynamic route.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List dynamic route deployments" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/deployments", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/routes/${pathParam(args, "id")}/deployments`, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiGateway/dynamicRouting/tools.ts b/src/generated/forge-mcp/aiGateway/dynamicRouting/tools.ts new file mode 100644 index 00000000..0147eab0 --- /dev/null +++ b/src/generated/forge-mcp/aiGateway/dynamicRouting/tools.ts @@ -0,0 +1,648 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai_gateway.dynamic_routing`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_gateway_dynamic_routing_create", + title: "Create a dynamic route", + description: "Creates a dynamic route on an AI Gateway from the specified routing elements. Clients call the route by using `dynamic/{name}` as the model name.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "elements": { + "items": { + "oneOf": [ + { + "properties": { + "id": { + "type": "string" + }, + "outputs": { + "properties": { + "next": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + } + }, + "required": [ + "next" + ], + "type": "object" + }, + "type": { + "enum": [ + "start" + ], + "type": "string" + } + }, + "required": [ + "id", + "outputs", + "type" + ], + "type": "object" + }, + { + "properties": { + "id": { + "type": "string" + }, + "outputs": { + "properties": { + "false": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + }, + "true": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + } + }, + "required": [ + "false", + "true" + ], + "type": "object" + }, + "properties": { + "properties": { + "conditions": { + "type": "object" + } + }, + "type": "object" + }, + "type": { + "enum": [ + "conditional" + ], + "type": "string" + } + }, + "required": [ + "id", + "outputs", + "properties", + "type" + ], + "type": "object" + }, + { + "properties": { + "id": { + "type": "string" + }, + "outputs": { + "additionalProperties": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + }, + "type": "object" + }, + "type": { + "enum": [ + "percentage" + ], + "type": "string" + } + }, + "required": [ + "id", + "outputs", + "type" + ], + "type": "object" + }, + { + "properties": { + "id": { + "type": "string" + }, + "outputs": { + "properties": { + "fallback": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + }, + "success": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + } + }, + "required": [ + "fallback", + "success" + ], + "type": "object" + }, + "properties": { + "properties": { + "key": { + "type": "string" + }, + "limit": { + "type": "number" + }, + "limitType": { + "enum": [ + "count", + "cost" + ], + "type": "string" + }, + "window": { + "type": "number" + } + }, + "required": [ + "key", + "limit", + "limitType", + "window" + ], + "type": "object" + }, + "type": { + "enum": [ + "rate" + ], + "type": "string" + } + }, + "required": [ + "id", + "outputs", + "properties", + "type" + ], + "type": "object" + }, + { + "properties": { + "id": { + "type": "string" + }, + "outputs": { + "properties": { + "fallback": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + }, + "success": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + } + }, + "required": [ + "fallback", + "success" + ], + "type": "object" + }, + "properties": { + "properties": { + "model": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "retries": { + "type": "number" + }, + "timeout": { + "type": "number" + } + }, + "required": [ + "model", + "provider", + "retries", + "timeout" + ], + "type": "object" + }, + "type": { + "enum": [ + "model" + ], + "type": "string" + } + }, + "required": [ + "id", + "outputs", + "properties", + "type" + ], + "type": "object" + }, + { + "properties": { + "id": { + "type": "string" + }, + "outputs": { + "additionalProperties": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + }, + "type": "object" + }, + "type": { + "enum": [ + "end" + ], + "type": "string" + } + }, + "required": [ + "id", + "outputs", + "type" + ], + "type": "object" + } + ] + }, + "type": "array" + }, + "name": { + "type": "string" + } + }, + "required": [ + "elements", + "name" + ], + "type": "object" + }, + "gateway_id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a dynamic route" + }, + method: "POST", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/routes`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_gateway_dynamic_routing_delete", + title: "Delete a dynamic route", + description: "Deletes a dynamic route from an AI Gateway.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a dynamic route" + }, + method: "DELETE", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/routes/${pathParam(args, "id")}`, + }), + }, + { + name: "ai_gateway_dynamic_routing_get", + title: "Get a dynamic route", + description: "Retrieves a dynamic route with its routing elements, active version, and current deployment.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a dynamic route" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/routes/${pathParam(args, "id")}`, + }), + }, + { + name: "ai_gateway_dynamic_routing_list", + title: "List dynamic routes", + description: "Lists the dynamic routes configured on an AI Gateway.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + }, + "page": { + "description": "Page number", + "type": "integer" + }, + "per_page": { + "description": "Number of routes per page", + "type": "integer" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List dynamic routes" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/routes`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, + { + name: "ai_gateway_dynamic_routing_update", + title: "Rename a dynamic route", + description: "Updates the name of a dynamic route. To change routing behaviour, create and deploy a new version.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "gateway_id": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Rename a dynamic route" + }, + method: "PATCH", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/routes/${pathParam(args, "id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiGateway/dynamicRouting/versions/tools.ts b/src/generated/forge-mcp/aiGateway/dynamicRouting/versions/tools.ts new file mode 100644 index 00000000..66140d65 --- /dev/null +++ b/src/generated/forge-mcp/aiGateway/dynamicRouting/versions/tools.ts @@ -0,0 +1,518 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `ai_gateway.dynamic_routing.versions`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_gateway_dynamic_routing_versions_create", + title: "Create a dynamic route version", + description: "Creates a new version of a dynamic route from the specified routing elements. The version does not serve traffic until you deploy it.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "elements": { + "items": { + "oneOf": [ + { + "properties": { + "id": { + "type": "string" + }, + "outputs": { + "properties": { + "next": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + } + }, + "required": [ + "next" + ], + "type": "object" + }, + "type": { + "enum": [ + "start" + ], + "type": "string" + } + }, + "required": [ + "id", + "outputs", + "type" + ], + "type": "object" + }, + { + "properties": { + "id": { + "type": "string" + }, + "outputs": { + "properties": { + "false": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + }, + "true": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + } + }, + "required": [ + "false", + "true" + ], + "type": "object" + }, + "properties": { + "properties": { + "conditions": { + "type": "object" + } + }, + "type": "object" + }, + "type": { + "enum": [ + "conditional" + ], + "type": "string" + } + }, + "required": [ + "id", + "outputs", + "properties", + "type" + ], + "type": "object" + }, + { + "properties": { + "id": { + "type": "string" + }, + "outputs": { + "additionalProperties": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + }, + "type": "object" + }, + "type": { + "enum": [ + "percentage" + ], + "type": "string" + } + }, + "required": [ + "id", + "outputs", + "type" + ], + "type": "object" + }, + { + "properties": { + "id": { + "type": "string" + }, + "outputs": { + "properties": { + "fallback": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + }, + "success": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + } + }, + "required": [ + "fallback", + "success" + ], + "type": "object" + }, + "properties": { + "properties": { + "key": { + "type": "string" + }, + "limit": { + "type": "number" + }, + "limitType": { + "enum": [ + "count", + "cost" + ], + "type": "string" + }, + "window": { + "type": "number" + } + }, + "required": [ + "key", + "limit", + "limitType", + "window" + ], + "type": "object" + }, + "type": { + "enum": [ + "rate" + ], + "type": "string" + } + }, + "required": [ + "id", + "outputs", + "properties", + "type" + ], + "type": "object" + }, + { + "properties": { + "id": { + "type": "string" + }, + "outputs": { + "properties": { + "fallback": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + }, + "success": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + } + }, + "required": [ + "fallback", + "success" + ], + "type": "object" + }, + "properties": { + "properties": { + "model": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "retries": { + "type": "number" + }, + "timeout": { + "type": "number" + } + }, + "required": [ + "model", + "provider", + "retries", + "timeout" + ], + "type": "object" + }, + "type": { + "enum": [ + "model" + ], + "type": "string" + } + }, + "required": [ + "id", + "outputs", + "properties", + "type" + ], + "type": "object" + }, + { + "properties": { + "id": { + "type": "string" + }, + "outputs": { + "additionalProperties": { + "properties": { + "elementId": { + "type": "string" + } + }, + "required": [ + "elementId" + ], + "type": "object" + }, + "type": "object" + }, + "type": { + "enum": [ + "end" + ], + "type": "string" + } + }, + "required": [ + "id", + "outputs", + "type" + ], + "type": "object" + } + ] + }, + "type": "array" + } + }, + "required": [ + "elements" + ], + "type": "object" + }, + "gateway_id": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a dynamic route version" + }, + method: "POST", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/routes/${pathParam(args, "id")}/versions`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_gateway_dynamic_routing_versions_get", + title: "Get a dynamic route version", + description: "Retrieves a saved version of a dynamic route, including its routing elements.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "version_id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id", + "version_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a dynamic route version" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions/{version_id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/routes/${pathParam(args, "id")}/versions/${pathParam(args, "version_id")}`, + }), + }, + { + name: "ai_gateway_dynamic_routing_versions_list", + title: "List dynamic route versions", + description: "Lists the saved versions of a dynamic route.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List dynamic route versions" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/routes/{id}/versions", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/routes/${pathParam(args, "id")}/versions`, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiGateway/evaluationTypes/tools.ts b/src/generated/forge-mcp/aiGateway/evaluationTypes/tools.ts new file mode 100644 index 00000000..aa59657a --- /dev/null +++ b/src/generated/forge-mcp/aiGateway/evaluationTypes/tools.ts @@ -0,0 +1,86 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai_gateway.evaluation_types`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_gateway_evaluation_types_list", + title: "List evaluator types (deprecated)", + description: "Lists the evaluator types that evaluations can use to score AI Gateway responses. Evaluations are deprecated and unavailable to new accounts.\n\nThis method is deprecated.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "order_by": { + "default": "mandatory", + "type": "string" + }, + "order_by_direction": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "page": { + "default": 1, + "type": "integer" + }, + "per_page": { + "default": 20, + "type": "integer" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List evaluator types (deprecated)" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/evaluation-types", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/evaluation-types`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["order_by", args["order_by"], true], + ["order_by_direction", args["order_by_direction"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/aiGateway/evaluations/tools.ts b/src/generated/forge-mcp/aiGateway/evaluations/tools.ts new file mode 100644 index 00000000..cdb2c62b --- /dev/null +++ b/src/generated/forge-mcp/aiGateway/evaluations/tools.ts @@ -0,0 +1,289 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai_gateway.evaluations`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_gateway_evaluations_create", + title: "Create an evaluation (deprecated)", + description: "Creates an evaluation that scores the logs in a dataset with the specified evaluator types. Evaluations and datasets are deprecated and unavailable to new accounts.\n\nThis method is deprecated.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "dataset_ids": { + "items": { + "type": "string" + }, + "maxItems": 5, + "minItems": 1, + "type": "array" + }, + "evaluation_type_ids": { + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "type": "string" + } + }, + "required": [ + "dataset_ids", + "evaluation_type_ids", + "name" + ], + "type": "object" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create an evaluation (deprecated)" + }, + method: "POST", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/evaluations`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_gateway_evaluations_delete", + title: "Delete an evaluation (deprecated)", + description: "Deletes an evaluation and its results. Evaluations and datasets are deprecated and unavailable to new accounts.\n\nThis method is deprecated.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete an evaluation (deprecated)" + }, + method: "DELETE", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/evaluations/${pathParam(args, "id")}`, + }), + }, + { + name: "ai_gateway_evaluations_get", + title: "Get an evaluation (deprecated)", + description: "Retrieves an evaluation and its results. Evaluations and datasets are deprecated and unavailable to new accounts.\n\nThis method is deprecated.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get an evaluation (deprecated)" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/evaluations/${pathParam(args, "id")}`, + }), + }, + { + name: "ai_gateway_evaluations_list", + title: "List evaluations (deprecated)", + description: "Lists the evaluations run on an AI Gateway. Evaluations and datasets are deprecated and unavailable to new accounts.\n\nThis method is deprecated.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "name": { + "type": "string" + }, + "page": { + "default": 1, + "type": "integer" + }, + "per_page": { + "default": 20, + "type": "integer" + }, + "processed": { + "type": "boolean" + }, + "search": { + "description": "Search by id, name", + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List evaluations (deprecated)" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/evaluations", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/evaluations`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["name", args["name"], true], + ["processed", args["processed"], true], + ["search", args["search"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/aiGateway/gateways/providers/tools.ts b/src/generated/forge-mcp/aiGateway/gateways/providers/tools.ts new file mode 100644 index 00000000..3d0effd7 --- /dev/null +++ b/src/generated/forge-mcp/aiGateway/gateways/providers/tools.ts @@ -0,0 +1,345 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `ai_gateway.gateways.providers`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_gateway_gateways_providers_create", + title: "Store a provider key", + description: "Stores an upstream AI provider API key for an AI Gateway in the Secrets Store configured on the gateway, with an optional rate limit. Pass `secret` to store a new key, or omit it to use an existing Secrets Store secret.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "alias": { + "type": "string" + }, + "default_config": { + "type": "boolean" + }, + "provider_slug": { + "type": "string" + }, + "rate_limit": { + "type": "number" + }, + "rate_limit_period": { + "default": 60, + "type": "number" + }, + "secret": { + "description": "Provider API key to store in the Secrets Store configured on the gateway.", + "type": "string" + }, + "secret_id": { + "type": "string" + } + }, + "required": [ + "alias", + "default_config", + "provider_slug" + ], + "type": "object" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Store a provider key" + }, + method: "POST", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/provider_configs", + extensions: { + "x-api-token-group": [ + "Secrets Store Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/provider_configs`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_gateway_gateways_providers_delete", + title: "Delete a provider key", + description: "Deletes a provider key configuration from an AI Gateway and deletes its secret from the Secrets Store.\n\nConfirm with the user before calling this tool. This deletes the stored provider key and its Secrets Store secret. Requests that rely on this key will stop authenticating with it.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a provider key" + }, + method: "DELETE", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/provider_configs/{id}", + extensions: { + "x-api-token-group": [ + "Secrets Store Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/provider_configs/${pathParam(args, "id")}`, + }), + }, + { + name: "ai_gateway_gateways_providers_get", + title: "Get a provider key", + description: "Retrieves a provider key configuration for an AI Gateway. The response shows a masked preview of the key, never the key itself.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a provider key" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/provider_configs/{id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/provider_configs/${pathParam(args, "id")}`, + }), + }, + { + name: "ai_gateway_gateways_providers_list", + title: "List provider keys", + description: "Lists the provider keys stored for an AI Gateway. Responses show a masked preview of each key, never the key itself.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "page": { + "default": 1, + "type": "integer" + }, + "per_page": { + "default": 20, + "type": "integer" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List provider keys" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/provider_configs", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/provider_configs`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, + { + name: "ai_gateway_gateways_providers_update", + title: "Rotate a provider key", + description: "Replaces the stored API key of a provider key configuration. Only the key can change.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "secret": { + "description": "Provider API key to store in the Secrets Store configured on the gateway.", + "type": "string" + } + }, + "required": [ + "secret" + ], + "type": "object" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Rotate a provider key" + }, + method: "PUT", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/provider_configs/{id}", + extensions: { + "x-api-token-group": [ + "Secrets Store Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/provider_configs/${pathParam(args, "id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiGateway/gateways/tools.ts b/src/generated/forge-mcp/aiGateway/gateways/tools.ts new file mode 100644 index 00000000..9677258b --- /dev/null +++ b/src/generated/forge-mcp/aiGateway/gateways/tools.ts @@ -0,0 +1,1741 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai_gateway.gateways`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_gateway_gateways_create", + title: "Create a gateway", + description: "Creates an AI Gateway in the account with the specified caching, rate limiting, logging, and authentication settings. The gateway ID appears in request URLs and must be unique within the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "authentication": { + "type": "boolean" + }, + "byok_only": { + "description": "Requires customer-provided provider credentials and prevents fallback to Unified Billing.", + "type": "boolean" + }, + "cache_invalidate_on_update": { + "type": "boolean" + }, + "cache_ttl": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "collect_logs": { + "type": "boolean" + }, + "dlp": { + "anyOf": [ + { + "properties": { + "action": { + "enum": [ + "BLOCK", + "FLAG" + ], + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "profiles": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "action", + "enabled", + "profiles" + ], + "type": "object" + }, + { + "properties": { + "enabled": { + "type": "boolean" + }, + "policies": { + "items": { + "properties": { + "action": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "check": { + "items": { + "enum": [ + "REQUEST", + "RESPONSE" + ], + "type": "string" + }, + "type": "array" + }, + "enabled": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "profiles": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "action", + "check", + "enabled", + "id", + "profiles" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "enabled", + "policies" + ], + "type": "object" + } + ] + }, + "guardrails": { + "oneOf": [ + { + "properties": { + "prompt": { + "properties": { + "P1": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S1": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S10": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S11": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S12": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S13": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S2": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S3": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S4": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S5": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S6": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S7": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S8": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S9": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + } + }, + "type": "object" + }, + "response": { + "properties": { + "P1": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S1": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S10": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S11": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S12": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S13": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S2": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S3": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S4": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S5": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S6": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S7": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S8": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S9": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + } + }, + "type": "object" + } + }, + "required": [ + "prompt", + "response" + ], + "type": "object" + }, + { + "type": "null" + } + ] + }, + "id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "log_classification": { + "type": "boolean" + }, + "log_management": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "log_management_strategy": { + "oneOf": [ + { + "enum": [ + "STOP_INSERTING", + "DELETE_OLDEST" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "logpush": { + "type": "boolean" + }, + "logpush_public_key": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "otel": { + "oneOf": [ + { + "items": { + "properties": { + "authorization": { + "type": "string" + }, + "content_type": { + "default": "json", + "enum": [ + "json", + "protobuf" + ], + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "url": { + "type": "string" + } + }, + "required": [ + "headers", + "url" + ], + "type": "object" + }, + "maxItems": 5, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "rate_limiting_interval": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "rate_limiting_limit": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "rate_limiting_technique": { + "oneOf": [ + { + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "retry_backoff": { + "description": "Backoff strategy for retry delays", + "oneOf": [ + { + "enum": [ + "constant", + "linear", + "exponential" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "retry_delay": { + "description": "Delay between retry attempts in milliseconds (0-60000)", + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "retry_max_attempts": { + "description": "Maximum number of retry attempts for failed requests (1-5)", + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "spend_limits": { + "oneOf": [ + { + "properties": { + "enabled": { + "default": false, + "type": "boolean" + }, + "rules": { + "default": [], + "items": { + "properties": { + "enabled": { + "default": true, + "type": "boolean" + }, + "id": { + "default": "00000000", + "type": "string" + }, + "limit": { + "type": "number" + }, + "limitType": { + "enum": [ + "cost" + ], + "type": "string" + }, + "metadata": { + "additionalProperties": { + "oneOf": [ + { + "properties": { + "mode": { + "enum": [ + "partition" + ], + "type": "string" + } + }, + "required": [ + "mode" + ], + "type": "object" + }, + { + "properties": { + "mode": { + "enum": [ + "filter" + ], + "type": "string" + }, + "values": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "mode", + "values" + ], + "type": "object" + } + ] + }, + "type": "object" + }, + "model": { + "properties": { + "mode": { + "enum": [ + "filter" + ], + "type": "string" + }, + "values": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "mode", + "values" + ], + "type": "object" + }, + "provider": { + "properties": { + "mode": { + "enum": [ + "filter" + ], + "type": "string" + }, + "values": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "mode", + "values" + ], + "type": "object" + }, + "technique": { + "default": "sliding", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + }, + "window": { + "type": "integer" + } + }, + "required": [ + "limit", + "limitType", + "window" + ], + "type": "object" + }, + "maxItems": 20, + "type": "array" + } + }, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "store_id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "stripe": { + "oneOf": [ + { + "properties": { + "authorization": { + "type": "string" + }, + "usage_events": { + "items": { + "properties": { + "payload": { + "type": "string" + } + }, + "required": [ + "payload" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "authorization", + "usage_events" + ], + "type": "object" + }, + { + "type": "null" + } + ] + }, + "workers_ai_billing_mode": { + "default": "postpaid", + "description": "Controls how Workers AI inference calls routed through this gateway are billed. 'postpaid' bills the account directly through Workers AI; 'unified' deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.", + "enum": [ + "postpaid", + "unified" + ], + "type": "string" + }, + "zdr": { + "type": "boolean" + } + }, + "required": [ + "cache_invalidate_on_update", + "cache_ttl", + "collect_logs", + "id", + "rate_limiting_interval", + "rate_limiting_limit" + ], + "type": "object" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a gateway" + }, + method: "POST", + path: "/accounts/{account_id}/ai-gateway/gateways", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_gateway_gateways_delete", + title: "Delete a gateway", + description: "Permanently deletes an AI Gateway, its configuration, and its stored logs.\n\nConfirm with the user before calling this tool. This permanently deletes the gateway, its configuration, and its stored logs. Requests sent to this gateway will fail. This action cannot be undone.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a gateway" + }, + method: "DELETE", + path: "/accounts/{account_id}/ai-gateway/gateways/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}`, + }), + }, + { + name: "ai_gateway_gateways_get", + title: "Get a gateway", + description: "Retrieves the configuration of an AI Gateway.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a gateway" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}`, + }), + }, + { + name: "ai_gateway_gateways_get_url", + title: "Get Gateway URL", + description: "Retrieves the endpoint URL for an AI Gateway.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "ai_gateway_provider": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "ai_gateway_provider" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Gateway URL" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/url/{provider}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/url/${pathParam(args, "ai_gateway_provider")}`, + }), + }, + { + name: "ai_gateway_gateways_list", + title: "List gateways", + description: "Lists the AI Gateways in the account. Use `search` to filter by gateway ID.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "page": { + "default": 1, + "type": "integer" + }, + "per_page": { + "default": 20, + "type": "integer" + }, + "search": { + "description": "Search by id", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List gateways" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["search", args["search"], true], + ], + }), + }, + { + name: "ai_gateway_gateways_update", + title: "Update a gateway", + description: "Updates the configuration of an AI Gateway, such as its caching, rate limiting, logging, and authentication settings.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "authentication": { + "type": "boolean" + }, + "byok_only": { + "description": "Requires customer-provided provider credentials and prevents fallback to Unified Billing.", + "type": "boolean" + }, + "cache_invalidate_on_update": { + "type": "boolean" + }, + "cache_ttl": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "collect_logs": { + "type": "boolean" + }, + "dlp": { + "anyOf": [ + { + "properties": { + "action": { + "enum": [ + "BLOCK", + "FLAG" + ], + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "profiles": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "action", + "enabled", + "profiles" + ], + "type": "object" + }, + { + "properties": { + "enabled": { + "type": "boolean" + }, + "policies": { + "items": { + "properties": { + "action": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "check": { + "items": { + "enum": [ + "REQUEST", + "RESPONSE" + ], + "type": "string" + }, + "type": "array" + }, + "enabled": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "profiles": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "action", + "check", + "enabled", + "id", + "profiles" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "enabled", + "policies" + ], + "type": "object" + } + ] + }, + "guardrails": { + "oneOf": [ + { + "properties": { + "prompt": { + "properties": { + "P1": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S1": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S10": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S11": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S12": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S13": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S2": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S3": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S4": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S5": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S6": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S7": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S8": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S9": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + } + }, + "type": "object" + }, + "response": { + "properties": { + "P1": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S1": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S10": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S11": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S12": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S13": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S2": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S3": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S4": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S5": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S6": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S7": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S8": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + }, + "S9": { + "enum": [ + "FLAG", + "BLOCK" + ], + "type": "string" + } + }, + "type": "object" + } + }, + "required": [ + "prompt", + "response" + ], + "type": "object" + }, + { + "type": "null" + } + ] + }, + "log_classification": { + "type": "boolean" + }, + "log_management": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "log_management_strategy": { + "oneOf": [ + { + "enum": [ + "STOP_INSERTING", + "DELETE_OLDEST" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "logpush": { + "type": "boolean" + }, + "logpush_public_key": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "otel": { + "oneOf": [ + { + "items": { + "properties": { + "authorization": { + "type": "string" + }, + "content_type": { + "default": "json", + "enum": [ + "json", + "protobuf" + ], + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "url": { + "type": "string" + } + }, + "required": [ + "headers", + "url" + ], + "type": "object" + }, + "maxItems": 5, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "rate_limiting_interval": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "rate_limiting_limit": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "rate_limiting_technique": { + "oneOf": [ + { + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "retry_backoff": { + "description": "Backoff strategy for retry delays", + "oneOf": [ + { + "enum": [ + "constant", + "linear", + "exponential" + ], + "type": "string" + }, + { + "type": "null" + } + ] + }, + "retry_delay": { + "description": "Delay between retry attempts in milliseconds (0-60000)", + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "retry_max_attempts": { + "description": "Maximum number of retry attempts for failed requests (1-5)", + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "spend_limits": { + "oneOf": [ + { + "properties": { + "enabled": { + "default": false, + "type": "boolean" + }, + "rules": { + "default": [], + "items": { + "properties": { + "enabled": { + "default": true, + "type": "boolean" + }, + "id": { + "default": "00000000", + "type": "string" + }, + "limit": { + "type": "number" + }, + "limitType": { + "enum": [ + "cost" + ], + "type": "string" + }, + "metadata": { + "additionalProperties": { + "oneOf": [ + { + "properties": { + "mode": { + "enum": [ + "partition" + ], + "type": "string" + } + }, + "required": [ + "mode" + ], + "type": "object" + }, + { + "properties": { + "mode": { + "enum": [ + "filter" + ], + "type": "string" + }, + "values": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "mode", + "values" + ], + "type": "object" + } + ] + }, + "type": "object" + }, + "model": { + "properties": { + "mode": { + "enum": [ + "filter" + ], + "type": "string" + }, + "values": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "mode", + "values" + ], + "type": "object" + }, + "provider": { + "properties": { + "mode": { + "enum": [ + "filter" + ], + "type": "string" + }, + "values": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "mode", + "values" + ], + "type": "object" + }, + "technique": { + "default": "sliding", + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + }, + "window": { + "type": "integer" + } + }, + "required": [ + "limit", + "limitType", + "window" + ], + "type": "object" + }, + "maxItems": 20, + "type": "array" + } + }, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "store_id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "stripe": { + "oneOf": [ + { + "properties": { + "authorization": { + "type": "string" + }, + "usage_events": { + "items": { + "properties": { + "payload": { + "type": "string" + } + }, + "required": [ + "payload" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "authorization", + "usage_events" + ], + "type": "object" + }, + { + "type": "null" + } + ] + }, + "workers_ai_billing_mode": { + "default": "postpaid", + "description": "Controls how Workers AI inference calls routed through this gateway are billed. 'postpaid' bills the account directly through Workers AI; 'unified' deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.", + "enum": [ + "postpaid", + "unified" + ], + "type": "string" + }, + "zdr": { + "type": "boolean" + } + }, + "required": [ + "cache_invalidate_on_update", + "cache_ttl", + "collect_logs", + "rate_limiting_interval", + "rate_limiting_limit" + ], + "type": "object" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update a gateway" + }, + method: "PUT", + path: "/accounts/{account_id}/ai-gateway/gateways/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiGateway/logs/tools.ts b/src/generated/forge-mcp/aiGateway/logs/tools.ts new file mode 100644 index 00000000..ad45cdcd --- /dev/null +++ b/src/generated/forge-mcp/aiGateway/logs/tools.ts @@ -0,0 +1,722 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai_gateway.logs`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_gateway_logs_delete", + title: "Delete Gateway Logs", + description: "Deletes gateway log entries matching the specified criteria.\n\nConfirm with the user before calling this tool. This permanently deletes every stored log entry on the gateway that matches the filters. Deleted logs cannot be recovered.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "filters": { + "items": { + "properties": { + "key": { + "enum": [ + "id", + "created_at", + "request_content_type", + "response_content_type", + "request_type", + "success", + "cached", + "provider", + "model", + "model_type", + "cost", + "tokens", + "tokens_in", + "tokens_out", + "duration", + "feedback", + "event_id", + "metadata.key", + "metadata.value", + "authentication", + "wholesale", + "compatibilityMode", + "dlp_action", + "user_agent" + ], + "type": "string" + }, + "operator": { + "enum": [ + "eq", + "neq", + "contains", + "lt", + "gt" + ], + "type": "string" + }, + "value": { + "description": "Filter values.", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "type": "array" + } + }, + "required": [ + "key", + "operator", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "limit": { + "default": 10000, + "type": "integer" + }, + "order_by": { + "default": "created_at", + "enum": [ + "created_at", + "provider", + "model", + "model_type", + "success", + "cached", + "cost", + "tokens_in", + "tokens_out", + "duration", + "feedback" + ], + "type": "string" + }, + "order_by_direction": { + "default": "asc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Gateway Logs" + }, + method: "DELETE", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/logs`, + query: [ + ["order_by", args["order_by"], true], + ["order_by_direction", args["order_by_direction"], true], + ["filters", args["filters"], true], + ["limit", args["limit"], true], + ], + }), + }, + { + name: "ai_gateway_logs_get", + title: "Get Gateway Log Detail", + description: "Retrieves detailed information for a specific AI Gateway log entry.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Gateway Log Detail" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/logs/${pathParam(args, "id")}`, + }), + }, + { + name: "ai_gateway_logs_get_request", + title: "Get Gateway Log Request", + description: "Retrieves the original request payload for an AI Gateway log entry.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Gateway Log Request" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}/request", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/logs/${pathParam(args, "id")}/request`, + }), + }, + { + name: "ai_gateway_logs_get_response", + title: "Get Gateway Log Response", + description: "Retrieves the response payload for an AI Gateway log entry.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Gateway Log Response" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}/response", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/logs/${pathParam(args, "id")}/response`, + }), + }, + { + name: "ai_gateway_logs_list", + title: "List Gateway Logs", + description: "Lists request/response log entries for the AI gateway with filtering and pagination.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "ai_gateway_provider": { + "type": "string" + }, + "cached": { + "type": "boolean" + }, + "direction": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "end_date": { + "format": "date-time", + "type": "string" + }, + "feedback": { + "enum": [ + -1, + 0, + 1 + ], + "type": "integer" + }, + "filters": { + "items": { + "properties": { + "key": { + "enum": [ + "id", + "created_at", + "request_content_type", + "response_content_type", + "request_type", + "success", + "cached", + "provider", + "model", + "model_type", + "cost", + "tokens", + "tokens_in", + "tokens_out", + "duration", + "feedback", + "event_id", + "metadata.key", + "metadata.value", + "authentication", + "wholesale", + "compatibilityMode", + "dlp_action", + "user_agent" + ], + "type": "string" + }, + "operator": { + "enum": [ + "eq", + "neq", + "contains", + "lt", + "gt" + ], + "type": "string" + }, + "value": { + "description": "Filter values.", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "type": "array" + } + }, + "required": [ + "key", + "operator", + "value" + ], + "type": "object" + }, + "type": "array" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "max_cost": { + "type": "number" + }, + "max_duration": { + "type": "number" + }, + "max_tokens_in": { + "type": "number" + }, + "max_tokens_out": { + "type": "number" + }, + "max_total_tokens": { + "type": "number" + }, + "meta_info": { + "type": "boolean" + }, + "min_cost": { + "type": "number" + }, + "min_duration": { + "type": "number" + }, + "min_tokens_in": { + "type": "number" + }, + "min_tokens_out": { + "type": "number" + }, + "min_total_tokens": { + "type": "number" + }, + "model": { + "description": "Model filter.", + "type": "string" + }, + "model_type": { + "type": "string" + }, + "order_by": { + "default": "created_at", + "enum": [ + "created_at", + "provider", + "model", + "model_type", + "success", + "cached" + ], + "type": "string" + }, + "order_by_direction": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "page": { + "default": 1, + "type": "integer" + }, + "per_page": { + "default": 20, + "type": "integer" + }, + "request_content_type": { + "type": "string" + }, + "response_content_type": { + "type": "string" + }, + "search": { + "description": "Free-text search over log metadata.", + "type": "string" + }, + "start_date": { + "format": "date-time", + "type": "string" + }, + "success": { + "type": "boolean" + } + }, + required: [ + "account_id", + "gateway_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Gateway Logs" + }, + method: "GET", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs", + extensions: { + "x-api-token-group": [ + "AI Gateway Write", + "AI Gateway Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/logs`, + query: [ + ["search", args["search"], true], + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["order_by", args["order_by"], true], + ["order_by_direction", args["order_by_direction"], true], + ["filters", args["filters"], true], + ["meta_info", args["meta_info"], true], + ["direction", args["direction"], true], + ["start_date", args["start_date"], true], + ["end_date", args["end_date"], true], + ["min_cost", args["min_cost"], true], + ["max_cost", args["max_cost"], true], + ["min_tokens_in", args["min_tokens_in"], true], + ["max_tokens_in", args["max_tokens_in"], true], + ["min_tokens_out", args["min_tokens_out"], true], + ["max_tokens_out", args["max_tokens_out"], true], + ["min_total_tokens", args["min_total_tokens"], true], + ["max_total_tokens", args["max_total_tokens"], true], + ["min_duration", args["min_duration"], true], + ["max_duration", args["max_duration"], true], + ["feedback", args["feedback"], true], + ["success", args["success"], true], + ["cached", args["cached"], true], + ["model", args["model"], true], + ["model_type", args["model_type"], true], + ["provider", args["ai_gateway_provider"], true], + ["request_content_type", args["request_content_type"], true], + ["response_content_type", args["response_content_type"], true], + ], + }), + }, + { + name: "ai_gateway_logs_update", + title: "Patch Gateway Log", + description: "Updates metadata for an AI Gateway log entry.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "feedback": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "metadata": { + "oneOf": [ + { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "score": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, + "gateway_id": { + "description": "Unique identifier of the AI Gateway within the account.", + "type": "string" + }, + "id": { + "type": "string" + } + }, + required: [ + "account_id", + "gateway_id", + "id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Patch Gateway Log" + }, + method: "PATCH", + path: "/accounts/{account_id}/ai-gateway/gateways/{gateway_id}/logs/{id}", + extensions: { + "x-api-token-group": [ + "AI Gateway Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.aig" + ], + "x-fern-enum": { + "com.cloudflare.api.account.aig": { + "name": "com_cloudflare_api_account_aig" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-gateway/gateways/${pathParam(args, "gateway_id")}/logs/${pathParam(args, "id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiSearch/items/tools.ts b/src/generated/forge-mcp/aiSearch/items/tools.ts new file mode 100644 index 00000000..84463819 --- /dev/null +++ b/src/generated/forge-mcp/aiSearch/items/tools.ts @@ -0,0 +1,762 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai_search.items`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_search_items_chunks", + title: "List Item Chunks.", + description: "Lists chunks for a specific item in an AI Search instance, including their text content.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "item_id": { + "type": "string" + }, + "limit": { + "default": 20, + "type": "integer" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + }, + "offset": { + "default": 0, + "type": "integer" + } + }, + required: [ + "account_id", + "namespace", + "instance_id", + "item_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Item Chunks." + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/items/{item_id}/chunks", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "item_id": { + "description": "Indexed item ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/items/${pathParam(args, "item_id")}/chunks`, + query: [ + ["limit", args["limit"], true], + ["offset", args["offset"], true], + ], + }), + }, + { + name: "ai_search_items_delete", + title: "Delete Item.", + description: "Deletes a file from a managed AI Search instance and removes its indexed data.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "item_id": { + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id", + "item_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Item." + }, + method: "DELETE", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/items/{item_id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "item_id": { + "description": "Indexed item ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/items/${pathParam(args, "item_id")}`, + }), + }, + { + name: "ai_search_items_download", + title: "Download Item Content.", + description: "Downloads the raw file content for a specific item from the managed AI Search instance storage.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "item_id": { + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id", + "item_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Download Item Content." + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/items/{item_id}/download", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "item_id": { + "description": "Indexed item ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/items/${pathParam(args, "item_id")}/download`, + }), + }, + { + name: "ai_search_items_get", + title: "Get Item.", + description: "Retrieves a specific indexed item from an AI Search instance.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "item_id": { + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id", + "item_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Item." + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/items/{item_id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "item_id": { + "description": "Indexed item ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/items/${pathParam(args, "item_id")}`, + }), + }, + { + name: "ai_search_items_list", + title: "Items List.", + description: "Lists indexed items in an AI Search instance.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "item_id": { + "description": "Return only the item with this unique ID. Returns at most one item.", + "type": "string" + }, + "key": { + "description": "Return only items with this exact key (object key / filename). Each key is unique within a source, so combine with `source` to disambiguate across data sources.", + "type": "string" + }, + "metadata_filter": { + "description": "JSON-encoded metadata filter using Vectorize filter syntax. Examples: {\"folder\":\"reports/\"}, {\"timestamp\":{\"$gte\":1700000000000}}, {\"folder\":{\"$in\":[\"docs/\",\"reports/\"]}}.", + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + }, + "page": { + "default": 1, + "type": "integer" + }, + "per_page": { + "default": 20, + "type": "integer" + }, + "search": { + "type": "string" + }, + "sort_by": { + "default": "status", + "description": "Sort order for items. \"status\" (default) sorts items according to status priority, then last_seen_at. \"modified_at\" sorts items according to file modification time (most recent first), falling back to created_at.", + "enum": [ + "status", + "modified_at" + ], + "type": "string" + }, + "source": { + "description": "Return only items with this source_id. Use \"builtin\" for uploaded files, or a source identifier like \"web-crawler:https://example.com\".", + "type": "string" + }, + "status": { + "enum": [ + "queued", + "running", + "completed", + "error", + "skipped", + "outdated" + ], + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Items List." + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/items", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/items`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["search", args["search"], true], + ["sort_by", args["sort_by"], true], + ["status", args["status"], true], + ["source", args["source"], true], + ["metadata_filter", args["metadata_filter"], true], + ["item_id", args["item_id"], true], + ["key", args["key"], true], + ], + }), + }, + { + name: "ai_search_items_logs", + title: "Item Logs.", + description: "Lists processing logs for a specific item in an AI Search instance.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "cursor": { + "type": "string" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "item_id": { + "type": "string" + }, + "limit": { + "default": 50, + "type": "integer" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id", + "item_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Item Logs." + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/items/{item_id}/logs", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "item_id": { + "description": "Indexed item ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/items/${pathParam(args, "item_id")}/logs`, + query: [ + ["limit", args["limit"], true], + ["cursor", args["cursor"], true], + ], + }), + }, + { + name: "ai_search_items_sync", + title: "Sync Item.", + description: "Synchronizes an item to an AI Search instance index.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "next_action": { + "enum": [ + "INDEX" + ], + "type": "string" + }, + "wait_for_completion": { + "default": false, + "description": "Wait for indexing before responding. After processing, vector-indexed instances use any time remaining in a 25s wait budget to confirm Vectorize ingestion. Processing itself continues uninterrupted and can exceed that budget. If confirmation times out, the response returns the current item state and background indexing continues. Defaults to false.", + "type": "boolean" + } + }, + "required": [ + "next_action" + ], + "type": "object" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "item_id": { + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id", + "item_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Sync Item." + }, + method: "PATCH", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/items/{item_id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "item_id": { + "description": "Indexed item ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + }, + "next_action": { + "default": "INDEX", + "hidden": true + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/items/${pathParam(args, "item_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_search_items_upload", + title: "Upload Item.", + description: "Uploads a file to a managed AI Search instance via multipart/form-data.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Upload Item." + }, + method: "POST", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/items", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/items`, + }), + }, + { + name: "ai_search_items_upsert", + title: "Create or Update Item.", + description: "Creates or updates an indexed item in an AI Search instance.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "key": { + "description": "Item key / filename. Must not exceed 128 characters.", + "type": "string" + }, + "next_action": { + "enum": [ + "INDEX" + ], + "type": "string" + }, + "wait_for_completion": { + "default": false, + "description": "Wait for indexing before responding. After processing, vector-indexed instances use any time remaining in a 25s wait budget to confirm Vectorize ingestion. Processing itself continues uninterrupted and can exceed that budget. If confirmation times out, the response returns the current item state and background indexing continues. Defaults to false.", + "type": "boolean" + } + }, + "required": [ + "key", + "next_action" + ], + "type": "object" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create or Update Item." + }, + method: "PUT", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/items", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + }, + "next_action": { + "default": "INDEX", + "hidden": true + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/items`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiSearch/jobs/tools.ts b/src/generated/forge-mcp/aiSearch/jobs/tools.ts new file mode 100644 index 00000000..61f15e15 --- /dev/null +++ b/src/generated/forge-mcp/aiSearch/jobs/tools.ts @@ -0,0 +1,406 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai_search.jobs`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_search_jobs_cancel", + title: "Cancel an indexing job.", + description: "Cancels an in-progress indexing job for an AI Search instance.\n\nThis method is beta.\n\nConfirm with the user before calling this tool. This operation cancels the running indexing job.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "action": { + "enum": [ + "cancel" + ], + "type": "string" + } + }, + "required": [ + "action" + ], + "type": "object" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "job_id": { + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id", + "job_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Cancel an indexing job." + }, + method: "PATCH", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/jobs/{job_id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "action": { + "default": "cancel", + "hidden": true + }, + "id": { + "description": "AI Search instance ID." + }, + "job_id": { + "description": "Indexing job ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/jobs/${pathParam(args, "job_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_search_jobs_create", + title: "Create new job", + description: "Creates a new indexing job for an AI Search instance.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "description": { + "type": "string" + } + }, + "type": "object" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create new job" + }, + method: "POST", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/jobs", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "description": { + "description": "Optional description for the indexing job." + }, + "id": { + "description": "AI Search instance ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/jobs`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_search_jobs_get", + title: "Get a Job Details", + description: "Retrieves details for a specific AI Search indexing job.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "job_id": { + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id", + "job_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a Job Details" + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/jobs/{job_id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "job_id": { + "description": "Indexing job ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/jobs/${pathParam(args, "job_id")}`, + }), + }, + { + name: "ai_search_jobs_list", + title: "List Jobs", + description: "Lists indexing jobs for an AI Search instance.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + }, + "page": { + "default": 1, + "type": "integer" + }, + "per_page": { + "default": 20, + "type": "integer" + } + }, + required: [ + "account_id", + "namespace", + "instance_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Jobs" + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/jobs", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/jobs`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, + { + name: "ai_search_jobs_logs", + title: "List Job Logs", + description: "Lists log entries for an AI Search indexing job.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "job_id": { + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + }, + "page": { + "default": 1, + "type": "integer" + }, + "per_page": { + "default": 20, + "type": "integer" + } + }, + required: [ + "account_id", + "namespace", + "instance_id", + "job_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Job Logs" + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/jobs/{job_id}/logs", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "job_id": { + "description": "Indexing job ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/jobs/${pathParam(args, "job_id")}/logs`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/aiSearch/namespace/tools.ts b/src/generated/forge-mcp/aiSearch/namespace/tools.ts new file mode 100644 index 00000000..b067bd6b --- /dev/null +++ b/src/generated/forge-mcp/aiSearch/namespace/tools.ts @@ -0,0 +1,531 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai_search.namespace`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_search_namespace_create", + title: "Create a namespace", + description: "Create a namespace for organizing AI Search instances.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "description": { + "description": "Optional description for the namespace. Max 256 characters.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "type": "string" + }, + "public_endpoint_params": { + "properties": { + "authorized_hosts": { + "items": { + "type": "string" + }, + "type": "array" + }, + "chat_completions_endpoint": { + "properties": { + "disabled": { + "default": false, + "description": "Disable chat completions endpoint for this public endpoint.", + "type": "boolean" + } + }, + "type": "object" + }, + "custom_domains": { + "description": "Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).", + "oneOf": [ + { + "items": { + "type": "string" + }, + "maxItems": 1, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "default_domain_enabled": { + "default": true, + "description": "When false, the instance is reachable only via a registered custom domain and the default .search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.", + "type": "boolean" + }, + "enabled": { + "default": false, + "type": "boolean" + }, + "instances_allowed": { + "default": [], + "description": "Instance IDs exposed through the namespace public endpoint. Empty means nothing is searchable. Every ID must reference an existing instance in this namespace, and the list must stay within the account's multi-instance search limit.", + "items": { + "type": "string" + }, + "maxItems": 10, + "type": "array" + }, + "mcp": { + "properties": { + "description": { + "default": "Finds exactly what you're looking for", + "type": "string" + }, + "disabled": { + "default": false, + "description": "Disable MCP endpoint for this public endpoint.", + "type": "boolean" + } + }, + "type": "object" + }, + "rate_limit": { + "properties": { + "period_ms": { + "type": "integer" + }, + "requests": { + "type": "integer" + }, + "technique": { + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "type": "object" + }, + "search_endpoint": { + "properties": { + "disabled": { + "default": false, + "description": "Disable search endpoint for this public endpoint.", + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "required": [ + "name" + ], + "type": "object" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a namespace" + }, + method: "POST", + path: "/accounts/{account_id}/ai-search/namespaces", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "name": { + "description": "Name for the new namespace.", + "positional": true + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_search_namespace_delete", + title: "Delete a namespace", + description: "Deletes a namespace permanently. The namespace must not contain any instances (instances whose deletion is still in progress do not count), and the default namespace cannot be deleted.\n\nThis method is beta.\n\nConfirm with the user before calling this tool. This operation permanently deletes the namespace.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "namespace": { + "type": "string" + } + }, + required: [ + "account_id", + "namespace" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a namespace" + }, + method: "DELETE", + path: "/accounts/{account_id}/ai-search/namespaces/{name}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "name": { + "description": "Namespace to delete." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}`, + }), + }, + { + name: "ai_search_namespace_get", + title: "Get a namespace", + description: "Retrieve a namespace and its description.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "namespace": { + "type": "string" + } + }, + required: [ + "account_id", + "namespace" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a namespace" + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/namespaces/{name}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "name": { + "description": "Namespace to retrieve." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}`, + }), + }, + { + name: "ai_search_namespace_list", + title: "List namespaces", + description: "Lists namespaces in the account, including their descriptions and creation times.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "page": { + "default": 1, + "description": "Page number (1-indexed).", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Number of results per page.", + "type": "integer" + }, + "search": { + "description": "Filter namespaces whose name or description contains this string (case-insensitive).", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List namespaces" + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/namespaces", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["search", args["search"], true], + ], + }), + }, + { + name: "ai_search_namespace_update", + title: "Update a namespace", + description: "Updates the description and/or the public endpoint configuration of an existing namespace. The default namespace's description cannot be modified, but its public endpoint can.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "description": { + "description": "Optional description for the namespace. Max 256 characters.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "public_endpoint_params": { + "oneOf": [ + { + "properties": { + "authorized_hosts": { + "items": { + "type": "string" + }, + "type": "array" + }, + "chat_completions_endpoint": { + "properties": { + "disabled": { + "default": false, + "description": "Disable chat completions endpoint for this public endpoint.", + "type": "boolean" + } + }, + "type": "object" + }, + "custom_domains": { + "description": "Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).", + "oneOf": [ + { + "items": { + "type": "string" + }, + "maxItems": 1, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "default_domain_enabled": { + "default": true, + "description": "When false, the instance is reachable only via a registered custom domain and the default .search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.", + "type": "boolean" + }, + "enabled": { + "default": false, + "type": "boolean" + }, + "instances_allowed": { + "default": [], + "description": "Instance IDs exposed through the namespace public endpoint. Empty means nothing is searchable. Every ID must reference an existing instance in this namespace, and the list must stay within the account's multi-instance search limit.", + "items": { + "type": "string" + }, + "maxItems": 10, + "type": "array" + }, + "mcp": { + "properties": { + "description": { + "default": "Finds exactly what you're looking for", + "type": "string" + }, + "disabled": { + "default": false, + "description": "Disable MCP endpoint for this public endpoint.", + "type": "boolean" + } + }, + "type": "object" + }, + "rate_limit": { + "properties": { + "period_ms": { + "type": "integer" + }, + "requests": { + "type": "integer" + }, + "technique": { + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "type": "object" + }, + "search_endpoint": { + "properties": { + "disabled": { + "default": false, + "description": "Disable search endpoint for this public endpoint.", + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, + "namespace": { + "type": "string" + } + }, + required: [ + "account_id", + "namespace" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update a namespace" + }, + method: "PUT", + path: "/accounts/{account_id}/ai-search/namespaces/{name}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "name": { + "description": "Namespace to update." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiSearch/tokens/tools.ts b/src/generated/forge-mcp/aiSearch/tokens/tools.ts new file mode 100644 index 00000000..ef4d6cc9 --- /dev/null +++ b/src/generated/forge-mcp/aiSearch/tokens/tools.ts @@ -0,0 +1,364 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `ai_search.tokens`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_search_tokens_create", + title: "Create a token", + description: "Create a stored Cloudflare credential for an AI Search instance to access its data source.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "cf_api_id": { + "type": "string" + }, + "cf_api_key": { + "type": "string" + }, + "legacy": { + "default": true, + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "required": [ + "cf_api_id", + "cf_api_key", + "name" + ], + "type": "object" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a token" + }, + method: "POST", + path: "/accounts/{account_id}/ai-search/tokens", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "cf_api_id": { + "description": "Cloudflare API token ID." + }, + "cf_api_key": { + "description": "Cloudflare API token value." + }, + "legacy": { + "description": "Whether the credential uses the legacy API key format." + }, + "name": { + "description": "Human-readable name for the credential.", + "positional": true + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/tokens`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_search_tokens_delete", + title: "Delete a token", + description: "Deletes a stored AI Search credential permanently. Credentials in use by an instance cannot be deleted.\n\nThis method is beta.\n\nConfirm with the user before calling this tool. This operation permanently deletes the stored credential.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "token_id": { + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "token_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a token" + }, + method: "DELETE", + path: "/accounts/{account_id}/ai-search/tokens/{id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "Stored credential record ID." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/tokens/${pathParam(args, "token_id")}`, + }), + }, + { + name: "ai_search_tokens_get", + title: "Get a token", + description: "Retrieve a stored AI Search credential without exposing its secret.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "token_id": { + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "token_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a token" + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/tokens/{id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "Stored credential record ID." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/tokens/${pathParam(args, "token_id")}`, + }), + }, + { + name: "ai_search_tokens_list", + title: "List tokens", + description: "Lists stored AI Search credentials in the account without exposing their secrets.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "page": { + "default": 1, + "description": "Page number (1-indexed).", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Number of results per page.", + "type": "integer" + }, + "search": { + "description": "Filter tokens whose name contains this string (case-insensitive).", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List tokens" + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/tokens", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/tokens`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["search", args["search"], true], + ], + }), + }, + { + name: "ai_search_tokens_update", + title: "Update a token", + description: "Replace a stored AI Search credential and invalidate cached credentials for instances that use it.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "cf_api_id": { + "type": "string" + }, + "cf_api_key": { + "type": "string" + }, + "legacy": { + "default": true, + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "required": [ + "cf_api_id", + "cf_api_key", + "name" + ], + "type": "object" + }, + "token_id": { + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "token_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update a token" + }, + method: "PUT", + path: "/accounts/{account_id}/ai-search/tokens/{id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "cf_api_id": { + "description": "Cloudflare API token ID." + }, + "cf_api_key": { + "description": "Cloudflare API token value." + }, + "id": { + "description": "Stored credential record ID." + }, + "legacy": { + "description": "Whether the credential uses the legacy API key format." + }, + "name": { + "description": "Human-readable name for the credential." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/tokens/${pathParam(args, "token_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiSearch/tools.ts b/src/generated/forge-mcp/aiSearch/tools.ts new file mode 100644 index 00000000..9f5d7b2d --- /dev/null +++ b/src/generated/forge-mcp/aiSearch/tools.ts @@ -0,0 +1,3077 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../_/tool.js"; + +/** + * The tools of `ai_search`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_search_chat_completions", + title: "Chat Completions", + description: "Performs a chat completion request against an AI Search instance, using indexed content as context for generating responses.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "ai_search_options": { + "properties": { + "cache": { + "properties": { + "cache_threshold": { + "enum": [ + "super_strict_match", + "close_enough", + "flexible_friend", + "anything_goes" + ], + "type": "string" + }, + "enabled": { + "type": "boolean" + } + }, + "type": "object" + }, + "custom_metadata": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "description": "Metadata added to AI Gateway logs for requests this operation triggers. Accepts up to 2 string, number, or boolean entries. Reserved keys: 'ai-search', 'task', 'origin', and any key beginning with 'cf.'.", + "type": "object" + }, + "query_rewrite": { + "properties": { + "enabled": { + "type": "boolean" + }, + "model": { + "description": "A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.", + "type": "string" + }, + "rewrite_prompt": { + "type": "string" + } + }, + "type": "object" + }, + "reranking": { + "properties": { + "enabled": { + "type": "boolean" + }, + "match_threshold": { + "default": 0.4, + "type": "number" + }, + "model": { + "type": "string" + } + }, + "type": "object" + }, + "retrieval": { + "properties": { + "boost_by": { + "description": "Metadata fields to boost search results by. Overrides the instance-level boost_by config. Direction defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields. Fields must match 'timestamp' or a defined custom_metadata field.", + "items": { + "properties": { + "direction": { + "description": "Boost direction. 'desc' = higher values rank higher (e.g. newer timestamps). 'asc' = lower values rank higher. 'exists' = boost chunks that have the field. 'not_exists' = boost chunks that lack the field. Optional — defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields.", + "enum": [ + "asc", + "desc", + "exists", + "not_exists" + ], + "type": "string" + }, + "field": { + "description": "Metadata field name to boost by. Use 'timestamp' for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.", + "type": "string" + } + }, + "required": [ + "field" + ], + "type": "object" + }, + "maxItems": 3, + "type": "array" + }, + "context_expansion": { + "default": 0, + "type": "integer" + }, + "filters": { + "type": "object" + }, + "fusion_method": { + "enum": [ + "max", + "rrf" + ], + "type": "string" + }, + "keyword_match_mode": { + "description": "Controls which documents become candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term and ranks results according to BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'.", + "enum": [ + "and", + "or" + ], + "type": "string" + }, + "match_threshold": { + "description": "Minimum similarity score a chunk must reach to be returned. When omitted, falls back to the instance-level score_threshold, then to 0.4.", + "type": "number" + }, + "max_num_results": { + "description": "Maximum number of results to return. When omitted, falls back to the instance-level max_num_results, then to 10.", + "type": "integer" + }, + "retrieval_type": { + "enum": [ + "vector", + "keyword", + "hybrid" + ], + "type": "string" + }, + "return_on_failure": { + "default": true, + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "messages": { + "items": { + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "oneOf": [ + { + "properties": { + "text": { + "type": "string" + }, + "type": { + "enum": [ + "text" + ], + "type": "string" + } + }, + "required": [ + "text", + "type" + ], + "type": "object" + }, + { + "properties": { + "image_url": { + "properties": { + "url": { + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "type": { + "enum": [ + "image_url" + ], + "type": "string" + } + }, + "required": [ + "image_url", + "type" + ], + "type": "object" + }, + { + "properties": { + "file": { + "properties": { + "file_data": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "filename": { + "type": "string" + } + }, + "required": [ + "filename" + ], + "type": "object" + }, + "type": { + "enum": [ + "file" + ], + "type": "string" + } + }, + "required": [ + "file", + "type" + ], + "type": "object" + } + ] + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "role": { + "enum": [ + "system", + "developer", + "user", + "assistant", + "tool" + ], + "type": "string" + } + }, + "required": [ + "content", + "role" + ], + "type": "object" + }, + "minItems": 1, + "type": "array" + }, + "model": { + "description": "A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.", + "type": "string" + }, + "stream": { + "type": "boolean" + } + }, + "required": [ + "messages" + ], + "type": "object" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Chat Completions" + }, + method: "POST", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/chat/completions", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/chat/completions`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_search_create", + title: "Create an AI Search instance.", + description: "Create a new AI Search instance with the given configuration. If type is omitted or null, a non-blank HTTP(S) source infers web-crawler and any other source infers r2; r2 sources must name an existing bucket. A missing or blank source without a type creates a managed upload-only instance.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "ai_gateway_id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "ai_search_model": { + "description": "A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "cache": { + "default": true, + "type": "boolean" + }, + "cache_threshold": { + "default": "close_enough", + "enum": [ + "super_strict_match", + "close_enough", + "flexible_friend", + "anything_goes" + ], + "type": "string" + }, + "cache_ttl": { + "default": 172800, + "description": "Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d).", + "enum": [ + 600, + 1800, + 3600, + 7200, + 21600, + 43200, + 86400, + 172800, + 259200, + 518400 + ], + "type": "integer" + }, + "chunk": { + "default": true, + "type": "boolean" + }, + "chunk_overlap": { + "default": 10, + "type": "integer" + }, + "chunk_size": { + "type": "integer" + }, + "custom_metadata": { + "items": { + "properties": { + "data_type": { + "enum": [ + "text", + "number", + "boolean", + "datetime" + ], + "type": "string" + }, + "field_name": { + "type": "string" + } + }, + "required": [ + "data_type", + "field_name" + ], + "type": "object" + }, + "maxItems": 5, + "type": "array" + }, + "embedding_model": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "fusion_method": { + "default": "rrf", + "enum": [ + "max", + "rrf" + ], + "type": "string" + }, + "hybrid_search_enabled": { + "deprecated": true, + "description": "Deprecated — use index_method instead. Defaults to true for new instances; set false to create a vector-only instance.", + "type": "boolean" + }, + "id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "index_method": { + "description": "Controls which storage backends indexing uses. Defaults to vector and keyword indexing for new instances. When set, both vector and keyword are required.", + "properties": { + "keyword": { + "description": "Enable keyword (BM25) storage backend.", + "type": "boolean" + }, + "vector": { + "description": "Enable vector (embedding) storage backend.", + "type": "boolean" + } + }, + "required": [ + "keyword", + "vector" + ], + "type": "object" + }, + "indexing_options": { + "oneOf": [ + { + "properties": { + "keyword_tokenizer": { + "default": "porter", + "description": "Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter.", + "enum": [ + "porter", + "trigram" + ], + "type": "string" + }, + "use_ocr": { + "default": false, + "description": "Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false.", + "type": "boolean" + } + }, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "max_num_results": { + "default": 10, + "type": "integer" + }, + "metadata": { + "properties": { + "created_from_aisearch_wizard": { + "type": "boolean" + }, + "created_from_emdash_plugin": { + "properties": { + "type": { + "enum": [ + "native", + "rest" + ], + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "type", + "version" + ], + "type": "object" + }, + "worker_domain": { + "type": "string" + } + }, + "type": "object" + }, + "public_endpoint_params": { + "properties": { + "authorized_hosts": { + "items": { + "type": "string" + }, + "type": "array" + }, + "chat_completions_endpoint": { + "properties": { + "disabled": { + "default": false, + "description": "Disable chat completions endpoint for this public endpoint.", + "type": "boolean" + } + }, + "type": "object" + }, + "custom_domains": { + "description": "Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).", + "oneOf": [ + { + "items": { + "type": "string" + }, + "maxItems": 1, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "default_domain_enabled": { + "default": true, + "description": "When false, the instance is reachable only via a registered custom domain and the default .search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.", + "type": "boolean" + }, + "enabled": { + "default": false, + "type": "boolean" + }, + "mcp": { + "properties": { + "description": { + "default": "Finds exactly what you're looking for", + "type": "string" + }, + "disabled": { + "default": false, + "description": "Disable MCP endpoint for this public endpoint.", + "type": "boolean" + } + }, + "type": "object" + }, + "rate_limit": { + "properties": { + "period_ms": { + "type": "integer" + }, + "requests": { + "type": "integer" + }, + "technique": { + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "type": "object" + }, + "search_endpoint": { + "properties": { + "disabled": { + "default": false, + "description": "Disable search endpoint for this public endpoint.", + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "reranking": { + "default": false, + "type": "boolean" + }, + "reranking_model": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "retrieval_options": { + "oneOf": [ + { + "properties": { + "boost_by": { + "description": "Metadata fields to boost search results by. Each entry specifies a metadata field and an optional direction. Direction defaults to 'asc' for numeric/datetime fields and 'exists' for text/boolean fields. Fields must match 'timestamp' or a defined custom_metadata field.", + "items": { + "properties": { + "direction": { + "description": "Boost direction. 'desc' = higher values rank higher (e.g. newer timestamps). 'asc' = lower values rank higher. 'exists' = boost chunks that have the field. 'not_exists' = boost chunks that lack the field. Optional — defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields.", + "enum": [ + "asc", + "desc", + "exists", + "not_exists" + ], + "type": "string" + }, + "field": { + "description": "Metadata field name to boost by. Use 'timestamp' for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.", + "type": "string" + } + }, + "required": [ + "field" + ], + "type": "object" + }, + "maxItems": 3, + "type": "array" + }, + "keyword_match_mode": { + "description": "Controls which documents become candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term and ranks results according to BM25 relevance. When omitted on an update, the existing stored value stays unchanged; when never set, search falls back to 'and'.", + "enum": [ + "and", + "or" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "rewrite_model": { + "description": "A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "rewrite_query": { + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Minimum similarity score a chunk must reach to be returned. Defaults to 0.4.", + "type": "number" + }, + "source": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "source_params": { + "oneOf": [ + { + "properties": { + "exclude_items": { + "description": "List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts have a limit of 10 rules; contact support to raise it.", + "items": { + "type": "string" + }, + "maxItems": 10, + "type": "array" + }, + "include_items": { + "description": "List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts have a limit of 10 rules; contact support to raise it.", + "items": { + "type": "string" + }, + "maxItems": 10, + "type": "array" + }, + "prefix": { + "type": "string" + }, + "r2_jurisdiction": { + "type": "string" + }, + "web_crawler": { + "default": { + "parse_type": "sitemap" + }, + "properties": { + "discover_options": { + "description": "Options for parse_type 'discover', where Browser Run discovers URLs through link following and sitemaps. Ignored for 'sitemap'.", + "properties": { + "depth": { + "default": 5, + "description": "Maximum link-follow depth from the seed URL.", + "type": "number" + }, + "include_external_links": { + "default": false, + "description": "Follow links that point outside the source domain. Must stay `false` because discover crawls only cover the zone you own.", + "type": "boolean" + }, + "include_subdomains": { + "default": false, + "description": "Follow links to subdomains of the source host.", + "type": "boolean" + }, + "limit": { + "default": 100000, + "description": "Maximum number of pages to crawl (1-100000).", + "type": "number" + }, + "max_age": { + "default": 86400, + "description": "Maximum content age in seconds to accept (0–604800).", + "type": "number" + }, + "source": { + "default": "all", + "description": "Where the crawler looks for URLs: 'sitemaps' reads sitemap XML only, 'links' follows page links only, 'all' does both.", + "enum": [ + "all", + "sitemaps", + "links" + ], + "type": "string" + } + }, + "type": "object" + }, + "parse_options": { + "properties": { + "content_selector": { + "description": "List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. The crawler stores and indexes only the matched HTML fragment. Omit the field to disable content selection; the API rejects empty arrays.", + "items": { + "properties": { + "path": { + "description": "Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.", + "type": "string" + }, + "selector": { + "description": "CSS selector to extract content from pages matching the path pattern. Disallowed characters: ;, `, $, {, }, \\. Must target a single element; if multiple elements match, the crawler ignores the selector and uses the full page.", + "type": "string" + } + }, + "required": [ + "path", + "selector" + ], + "type": "object" + }, + "maxItems": 10, + "minItems": 1, + "type": "array" + }, + "include_headers": { + "additionalProperties": { + "type": "string" + }, + "description": "Up to 5 custom HTTP headers sent with each crawl request. Names must use RFC-7230 token characters, excluding spaces, colons, and control characters. Values must use HTAB and printable ASCII only, excluding CR and LF.", + "type": "object" + }, + "include_images": { + "default": false, + "type": "boolean" + }, + "specific_sitemaps": { + "description": "List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'.", + "items": { + "type": "string" + }, + "maxItems": 10, + "type": "array" + }, + "use_browser_rendering": { + "default": true, + "type": "boolean" + } + }, + "type": "object" + }, + "parse_type": { + "default": "sitemap", + "description": "How the crawler finds URLs. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to belong to a Verified zone on this account.", + "enum": [ + "sitemap", + "discover" + ], + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "sync_interval": { + "description": "Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h). Defaults to 21600 (6h); instances crawling a domain outside the account may be set to 86400.", + "enum": [ + 900, + 1800, + 3600, + 7200, + 14400, + 21600, + 43200, + 86400 + ], + "type": "integer" + }, + "token_id": { + "format": "uuid", + "type": "string" + }, + "type": { + "description": "Source type. When omitted or null with a non-blank source, HTTP(S) URLs infer web-crawler and existing R2 bucket names infer r2. A missing or blank source without a type uses managed upload-only storage.", + "oneOf": [ + { + "enum": [ + "r2", + "web-crawler" + ], + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create an AI Search instance." + }, + method: "POST", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "Unique ID for the new AI Search instance.", + "positional": true + }, + "namespace": { + "description": "Namespace to use for this operation." + }, + "source": { + "description": "R2 bucket name or HTTP(S) root website URL to index. When type is omitted, the source determines it." + }, + "source_params": { + "description": "Optional data source settings as a JSON object." + }, + "type": { + "description": "Data source type: r2 or web-crawler." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_search_delete", + title: "Delete an AI Search instance.", + description: "Deletes an AI Search instance and all its indexed data permanently.\n\nThis method is beta.\n\nConfirm with the user before calling this tool. This operation permanently deletes the AI Search instance and all its indexed data.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "instance_id": { + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete an AI Search instance." + }, + method: "DELETE", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}`, + }), + }, + { + name: "ai_search_get", + title: "Get an AI Search instance.", + description: "Retrieve the configuration and status of an AI Search instance.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "instance_id": { + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get an AI Search instance." + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}`, + }), + }, + { + name: "ai_search_list", + title: "List AI Search instances.", + description: "Lists all AI Search instances in the account.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "hostname": { + "description": "Return only instances with this exact Search for Agents hostname (case-insensitive).", + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + }, + "order_by": { + "default": "created_at", + "description": "Field to order results by.", + "enum": [ + "created_at" + ], + "type": "string" + }, + "order_by_direction": { + "default": "desc", + "description": "Order direction.", + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "page": { + "default": 1, + "description": "Page number (1-indexed).", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Number of results per page.", + "type": "integer" + }, + "search": { + "description": "Filter instances whose id contains this string (case-insensitive).", + "type": "string" + } + }, + required: [ + "account_id", + "namespace" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List AI Search instances." + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["search", args["search"], true], + ["hostname", args["hostname"], true], + ["order_by", args["order_by"], true], + ["order_by_direction", args["order_by_direction"], true], + ], + }), + }, + { + name: "ai_search_move", + title: "Move an instance to a different namespace.", + description: "Moves an instance from its current namespace to the specified target namespace. Use 'default' with --destination-namespace to move the instance back to the default namespace. Fails with 400 if the target namespace already has an instance with the same id (ids must be unique within a namespace — the same id can exist in different namespaces).", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "new_namespace": { + "description": "Target namespace to move the instance into.", + "type": "string" + } + }, + "required": [ + "new_namespace" + ], + "type": "object" + }, + "instance_id": { + "description": "Instance id.", + "type": "string" + }, + "source_namespace": { + "description": "Current namespace of the instance.", + "type": "string" + } + }, + required: [ + "account_id", + "source_namespace", + "instance_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Move an instance to a different namespace." + }, + method: "PATCH", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "namespace": { + "description": "Namespace currently containing the instance." + }, + "new_namespace": { + "description": "Namespace to move the instance into." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "source_namespace")}/instances/${pathParam(args, "instance_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_search_multi_chat_completions", + title: "Multi-Instance Chat Completions", + description: "Performs a chat completion request against multiple AI Search instances in parallel, merging retrieved content as context for generating a response.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "ai_search_options": { + "properties": { + "cache": { + "properties": { + "cache_threshold": { + "enum": [ + "super_strict_match", + "close_enough", + "flexible_friend", + "anything_goes" + ], + "type": "string" + }, + "enabled": { + "type": "boolean" + } + }, + "type": "object" + }, + "custom_metadata": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "description": "Metadata added to AI Gateway logs for requests this operation triggers. Accepts up to 2 string, number, or boolean entries. Reserved keys: 'ai-search', 'task', 'origin', and any key beginning with 'cf.'.", + "type": "object" + }, + "instance_ids": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "query_rewrite": { + "properties": { + "enabled": { + "type": "boolean" + }, + "model": { + "description": "A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.", + "type": "string" + }, + "rewrite_prompt": { + "type": "string" + } + }, + "type": "object" + }, + "reranking": { + "properties": { + "enabled": { + "type": "boolean" + }, + "match_threshold": { + "default": 0.4, + "type": "number" + }, + "model": { + "type": "string" + } + }, + "type": "object" + }, + "retrieval": { + "properties": { + "boost_by": { + "description": "Metadata fields to boost search results by. Overrides the instance-level boost_by config. Direction defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields. Fields must match 'timestamp' or a defined custom_metadata field.", + "items": { + "properties": { + "direction": { + "description": "Boost direction. 'desc' = higher values rank higher (e.g. newer timestamps). 'asc' = lower values rank higher. 'exists' = boost chunks that have the field. 'not_exists' = boost chunks that lack the field. Optional — defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields.", + "enum": [ + "asc", + "desc", + "exists", + "not_exists" + ], + "type": "string" + }, + "field": { + "description": "Metadata field name to boost by. Use 'timestamp' for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.", + "type": "string" + } + }, + "required": [ + "field" + ], + "type": "object" + }, + "maxItems": 3, + "type": "array" + }, + "context_expansion": { + "default": 0, + "type": "integer" + }, + "filters": { + "type": "object" + }, + "fusion_method": { + "enum": [ + "max", + "rrf" + ], + "type": "string" + }, + "keyword_match_mode": { + "description": "Controls which documents become candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term and ranks results according to BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'.", + "enum": [ + "and", + "or" + ], + "type": "string" + }, + "match_threshold": { + "description": "Minimum score a chunk must reach to be returned. When omitted, each instance's chunks are filtered by that instance's score_threshold, capped at the lower of the first instance's score_threshold and 0.4.", + "type": "number" + }, + "max_num_results": { + "description": "Maximum number of merged results to return. When omitted, defaults to the first instance's max_num_results, then 10.", + "type": "integer" + }, + "retrieval_type": { + "enum": [ + "vector", + "keyword", + "hybrid" + ], + "type": "string" + }, + "return_on_failure": { + "default": true, + "type": "boolean" + } + }, + "type": "object" + } + }, + "required": [ + "instance_ids" + ], + "type": "object" + }, + "messages": { + "items": { + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "oneOf": [ + { + "properties": { + "text": { + "type": "string" + }, + "type": { + "enum": [ + "text" + ], + "type": "string" + } + }, + "required": [ + "text", + "type" + ], + "type": "object" + }, + { + "properties": { + "image_url": { + "properties": { + "url": { + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "type": { + "enum": [ + "image_url" + ], + "type": "string" + } + }, + "required": [ + "image_url", + "type" + ], + "type": "object" + }, + { + "properties": { + "file": { + "properties": { + "file_data": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "filename": { + "type": "string" + } + }, + "required": [ + "filename" + ], + "type": "object" + }, + "type": { + "enum": [ + "file" + ], + "type": "string" + } + }, + "required": [ + "file", + "type" + ], + "type": "object" + } + ] + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "role": { + "enum": [ + "system", + "developer", + "user", + "assistant", + "tool" + ], + "type": "string" + } + }, + "required": [ + "content", + "role" + ], + "type": "object" + }, + "minItems": 1, + "type": "array" + }, + "model": { + "description": "A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.", + "type": "string" + }, + "stream": { + "type": "boolean" + } + }, + "required": [ + "ai_search_options", + "messages" + ], + "type": "object" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Multi-Instance Chat Completions" + }, + method: "POST", + path: "/accounts/{account_id}/ai-search/namespaces/{name}/chat/completions", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "name": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/chat/completions`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_search_multi_search", + title: "Multi-Instance Search", + description: "Performs a semantic search query against multiple AI Search instances in parallel, merging the retrieved results into a single ranked response.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "ai_search_options": { + "properties": { + "cache": { + "properties": { + "cache_threshold": { + "enum": [ + "super_strict_match", + "close_enough", + "flexible_friend", + "anything_goes" + ], + "type": "string" + }, + "enabled": { + "type": "boolean" + } + }, + "type": "object" + }, + "custom_metadata": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "description": "Metadata added to AI Gateway logs for requests this operation triggers. Accepts up to 2 string, number, or boolean entries. Reserved keys: 'ai-search', 'task', 'origin', and any key beginning with 'cf.'.", + "type": "object" + }, + "instance_ids": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "query_rewrite": { + "properties": { + "enabled": { + "type": "boolean" + }, + "model": { + "description": "A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.", + "type": "string" + }, + "rewrite_prompt": { + "type": "string" + } + }, + "type": "object" + }, + "reranking": { + "properties": { + "enabled": { + "type": "boolean" + }, + "match_threshold": { + "default": 0.4, + "type": "number" + }, + "model": { + "type": "string" + } + }, + "type": "object" + }, + "retrieval": { + "properties": { + "boost_by": { + "description": "Metadata fields to boost search results by. Overrides the instance-level boost_by config. Direction defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields. Fields must match 'timestamp' or a defined custom_metadata field.", + "items": { + "properties": { + "direction": { + "description": "Boost direction. 'desc' = higher values rank higher (e.g. newer timestamps). 'asc' = lower values rank higher. 'exists' = boost chunks that have the field. 'not_exists' = boost chunks that lack the field. Optional — defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields.", + "enum": [ + "asc", + "desc", + "exists", + "not_exists" + ], + "type": "string" + }, + "field": { + "description": "Metadata field name to boost by. Use 'timestamp' for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.", + "type": "string" + } + }, + "required": [ + "field" + ], + "type": "object" + }, + "maxItems": 3, + "type": "array" + }, + "context_expansion": { + "default": 0, + "type": "integer" + }, + "filters": { + "type": "object" + }, + "fusion_method": { + "enum": [ + "max", + "rrf" + ], + "type": "string" + }, + "keyword_match_mode": { + "description": "Controls which documents become candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term and ranks results according to BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'.", + "enum": [ + "and", + "or" + ], + "type": "string" + }, + "match_threshold": { + "description": "Minimum score a chunk must reach to be returned. When omitted, each instance's chunks are filtered by that instance's score_threshold, capped at 0.4.", + "type": "number" + }, + "max_num_results": { + "description": "Maximum number of merged results to return. When omitted, defaults to the sum of the searched instances' max_num_results (each falling back to 10), up to 50.", + "type": "integer" + }, + "retrieval_type": { + "enum": [ + "vector", + "keyword", + "hybrid" + ], + "type": "string" + }, + "return_on_failure": { + "default": true, + "type": "boolean" + } + }, + "type": "object" + } + }, + "required": [ + "instance_ids" + ], + "type": "object" + }, + "messages": { + "description": "OpenAI-compatible message array. For multimodal queries, set the last user message's `content` to an array of typed parts: `[{type:'text', text:'…'}, {type:'image_url', image_url:{url:'…'}}]`. Image inputs require the RAG's embedding_model to declare 'image' in supported_modalities.", + "items": { + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "oneOf": [ + { + "properties": { + "text": { + "type": "string" + }, + "type": { + "enum": [ + "text" + ], + "type": "string" + } + }, + "required": [ + "text", + "type" + ], + "type": "object" + }, + { + "properties": { + "image_url": { + "properties": { + "url": { + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "type": { + "enum": [ + "image_url" + ], + "type": "string" + } + }, + "required": [ + "image_url", + "type" + ], + "type": "object" + }, + { + "properties": { + "file": { + "properties": { + "file_data": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "filename": { + "type": "string" + } + }, + "required": [ + "filename" + ], + "type": "object" + }, + "type": { + "enum": [ + "file" + ], + "type": "string" + } + }, + "required": [ + "file", + "type" + ], + "type": "object" + } + ] + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "role": { + "enum": [ + "system", + "developer", + "user", + "assistant", + "tool" + ], + "type": "string" + } + }, + "required": [ + "content", + "role" + ], + "type": "object" + }, + "minItems": 1, + "type": "array" + }, + "query": { + "description": "A simple text query string. Alternative to 'messages' — provide either this or 'messages', not both.", + "type": "string" + } + }, + "required": [ + "ai_search_options" + ], + "type": "object" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Multi-Instance Search" + }, + method: "POST", + path: "/accounts/{account_id}/ai-search/namespaces/{name}/search", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "name": { + "description": "Namespace to use for this operation." + }, + "query": { + "description": "Text to search for.", + "positional": true + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/search`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_search_purge_cache", + title: "Purge search cache.", + description: "Purges all cached search results for an AI Search instance. A new internal cache key is generated, immediately orphaning all prior cached entries.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Purge search cache." + }, + method: "POST", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/purge_cache", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/purge_cache`, + }), + }, + { + name: "ai_search_search", + title: "Search", + description: "Executes a semantic search query against an AI Search instance to find relevant indexed content.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "ai_search_options": { + "properties": { + "cache": { + "properties": { + "cache_threshold": { + "enum": [ + "super_strict_match", + "close_enough", + "flexible_friend", + "anything_goes" + ], + "type": "string" + }, + "enabled": { + "type": "boolean" + } + }, + "type": "object" + }, + "custom_metadata": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "description": "Metadata added to AI Gateway logs for requests this operation triggers. Accepts up to 2 string, number, or boolean entries. Reserved keys: 'ai-search', 'task', 'origin', and any key beginning with 'cf.'.", + "type": "object" + }, + "query_rewrite": { + "properties": { + "enabled": { + "type": "boolean" + }, + "model": { + "description": "A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.", + "type": "string" + }, + "rewrite_prompt": { + "type": "string" + } + }, + "type": "object" + }, + "reranking": { + "properties": { + "enabled": { + "type": "boolean" + }, + "match_threshold": { + "default": 0.4, + "type": "number" + }, + "model": { + "type": "string" + } + }, + "type": "object" + }, + "retrieval": { + "properties": { + "boost_by": { + "description": "Metadata fields to boost search results by. Overrides the instance-level boost_by config. Direction defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields. Fields must match 'timestamp' or a defined custom_metadata field.", + "items": { + "properties": { + "direction": { + "description": "Boost direction. 'desc' = higher values rank higher (e.g. newer timestamps). 'asc' = lower values rank higher. 'exists' = boost chunks that have the field. 'not_exists' = boost chunks that lack the field. Optional — defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields.", + "enum": [ + "asc", + "desc", + "exists", + "not_exists" + ], + "type": "string" + }, + "field": { + "description": "Metadata field name to boost by. Use 'timestamp' for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.", + "type": "string" + } + }, + "required": [ + "field" + ], + "type": "object" + }, + "maxItems": 3, + "type": "array" + }, + "context_expansion": { + "default": 0, + "type": "integer" + }, + "filters": { + "type": "object" + }, + "fusion_method": { + "enum": [ + "max", + "rrf" + ], + "type": "string" + }, + "keyword_match_mode": { + "description": "Controls which documents become candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term and ranks results according to BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'.", + "enum": [ + "and", + "or" + ], + "type": "string" + }, + "match_threshold": { + "description": "Minimum similarity score a chunk must reach to be returned. When omitted, falls back to the instance-level score_threshold, then to 0.4.", + "type": "number" + }, + "max_num_results": { + "description": "Maximum number of results to return. When omitted, falls back to the instance-level max_num_results, then to 10.", + "type": "integer" + }, + "retrieval_type": { + "enum": [ + "vector", + "keyword", + "hybrid" + ], + "type": "string" + }, + "return_on_failure": { + "default": true, + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "messages": { + "description": "OpenAI-compatible message array. For multimodal queries, set the last user message's `content` to an array of typed parts: `[{type:'text', text:'…'}, {type:'image_url', image_url:{url:'…'}}]`. Image inputs require the RAG's embedding_model to declare 'image' in supported_modalities.", + "items": { + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "oneOf": [ + { + "properties": { + "text": { + "type": "string" + }, + "type": { + "enum": [ + "text" + ], + "type": "string" + } + }, + "required": [ + "text", + "type" + ], + "type": "object" + }, + { + "properties": { + "image_url": { + "properties": { + "url": { + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "type": { + "enum": [ + "image_url" + ], + "type": "string" + } + }, + "required": [ + "image_url", + "type" + ], + "type": "object" + }, + { + "properties": { + "file": { + "properties": { + "file_data": { + "type": "string" + }, + "file_id": { + "type": "string" + }, + "filename": { + "type": "string" + } + }, + "required": [ + "filename" + ], + "type": "object" + }, + "type": { + "enum": [ + "file" + ], + "type": "string" + } + }, + "required": [ + "file", + "type" + ], + "type": "object" + } + ] + }, + "minItems": 1, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "role": { + "enum": [ + "system", + "developer", + "user", + "assistant", + "tool" + ], + "type": "string" + } + }, + "required": [ + "content", + "role" + ], + "type": "object" + }, + "minItems": 1, + "type": "array" + }, + "query": { + "description": "A simple text query string. Alternative to 'messages' — provide either this or 'messages', not both.", + "type": "string" + } + }, + "type": "object" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Search" + }, + method: "POST", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/search", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + }, + "query": { + "description": "Text to search for.", + "positional": true + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/search`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "ai_search_stats", + title: "Get instance statistics.", + description: "Retrieve usage and indexing statistics for an AI Search instance.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "instance_id": { + "description": "AI Search instance ID. Lowercase alphanumeric, hyphens, and underscores.", + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get instance statistics." + }, + method: "GET", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}/stats", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}/stats`, + }), + }, + { + name: "ai_search_update", + title: "Update an AI Search instance.", + description: "Updates the configuration of an AI Search instance.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "ai_gateway_id": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "ai_search_model": { + "description": "A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "cache": { + "default": true, + "type": "boolean" + }, + "cache_threshold": { + "default": "close_enough", + "enum": [ + "super_strict_match", + "close_enough", + "flexible_friend", + "anything_goes" + ], + "type": "string" + }, + "cache_ttl": { + "default": 172800, + "description": "Cache entry TTL in seconds. Allowed values: 600 (10min), 1800 (30min), 3600 (1h), 7200 (2h), 21600 (6h), 43200 (12h), 86400 (24h), 172800 (48h), 259200 (72h), 518400 (6d).", + "enum": [ + 600, + 1800, + 3600, + 7200, + 21600, + 43200, + 86400, + 172800, + 259200, + 518400 + ], + "type": "integer" + }, + "chunk": { + "default": true, + "type": "boolean" + }, + "chunk_overlap": { + "default": 10, + "type": "integer" + }, + "chunk_size": { + "type": "integer" + }, + "custom_metadata": { + "items": { + "properties": { + "data_type": { + "enum": [ + "text", + "number", + "boolean", + "datetime" + ], + "type": "string" + }, + "field_name": { + "type": "string" + } + }, + "required": [ + "data_type", + "field_name" + ], + "type": "object" + }, + "maxItems": 5, + "type": "array" + }, + "embedding_model": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "fusion_method": { + "default": "rrf", + "enum": [ + "max", + "rrf" + ], + "type": "string" + }, + "index_method": { + "description": "Controls which storage backends indexing uses. Defaults to vector and keyword indexing for new instances. When set, both vector and keyword are required.", + "properties": { + "keyword": { + "description": "Enable keyword (BM25) storage backend.", + "type": "boolean" + }, + "vector": { + "description": "Enable vector (embedding) storage backend.", + "type": "boolean" + } + }, + "required": [ + "keyword", + "vector" + ], + "type": "object" + }, + "indexing_options": { + "oneOf": [ + { + "properties": { + "keyword_tokenizer": { + "default": "porter", + "description": "Tokenizer used for keyword search indexing. porter provides word-level tokenization with Porter stemming (good for natural language queries). trigram enables character-level substring matching (good for partial matches, code, identifiers). Changing this triggers a full re-index. Defaults to porter.", + "enum": [ + "porter", + "trigram" + ], + "type": "string" + }, + "use_ocr": { + "default": false, + "description": "Enables OCR ingestion for PDFs and images. Changing this triggers a full re-index. Defaults to false.", + "type": "boolean" + } + }, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "max_num_results": { + "default": 10, + "type": "integer" + }, + "metadata": { + "properties": { + "created_from_aisearch_wizard": { + "type": "boolean" + }, + "created_from_emdash_plugin": { + "properties": { + "type": { + "enum": [ + "native", + "rest" + ], + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "type", + "version" + ], + "type": "object" + }, + "worker_domain": { + "type": "string" + } + }, + "type": "object" + }, + "paused": { + "type": "boolean" + }, + "public_endpoint_params": { + "properties": { + "authorized_hosts": { + "items": { + "type": "string" + }, + "type": "array" + }, + "chat_completions_endpoint": { + "properties": { + "disabled": { + "default": false, + "description": "Disable chat completions endpoint for this public endpoint.", + "type": "boolean" + } + }, + "type": "object" + }, + "custom_domains": { + "description": "Custom domain hostnames that alias this public endpoint. GET and create responses return the current set; on update (PUT) this field is only echoed back when supplied in the request body, otherwise it is null (omit it to leave domains unchanged).", + "oneOf": [ + { + "items": { + "type": "string" + }, + "maxItems": 1, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "default_domain_enabled": { + "default": true, + "description": "When false, the instance is reachable only via a registered custom domain and the default .search.ai.cloudflare.com host returns 404. Requires at least one custom domain. Defaults to true. public_endpoint_params is replaced wholesale on update, so resend default_domain_enabled on every update to keep the default host off — omitting it resets to true.", + "type": "boolean" + }, + "enabled": { + "default": false, + "type": "boolean" + }, + "mcp": { + "properties": { + "description": { + "default": "Finds exactly what you're looking for", + "type": "string" + }, + "disabled": { + "default": false, + "description": "Disable MCP endpoint for this public endpoint.", + "type": "boolean" + } + }, + "type": "object" + }, + "rate_limit": { + "properties": { + "period_ms": { + "type": "integer" + }, + "requests": { + "type": "integer" + }, + "technique": { + "enum": [ + "fixed", + "sliding" + ], + "type": "string" + } + }, + "type": "object" + }, + "search_endpoint": { + "properties": { + "disabled": { + "default": false, + "description": "Disable search endpoint for this public endpoint.", + "type": "boolean" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "reranking": { + "default": false, + "type": "boolean" + }, + "reranking_model": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "retrieval_options": { + "oneOf": [ + { + "properties": { + "boost_by": { + "description": "Metadata fields to boost search results by. Each entry specifies a metadata field and an optional direction. Direction defaults to 'asc' for numeric/datetime fields and 'exists' for text/boolean fields. Fields must match 'timestamp' or a defined custom_metadata field.", + "items": { + "properties": { + "direction": { + "description": "Boost direction. 'desc' = higher values rank higher (e.g. newer timestamps). 'asc' = lower values rank higher. 'exists' = boost chunks that have the field. 'not_exists' = boost chunks that lack the field. Optional — defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields.", + "enum": [ + "asc", + "desc", + "exists", + "not_exists" + ], + "type": "string" + }, + "field": { + "description": "Metadata field name to boost by. Use 'timestamp' for document freshness, or any custom_metadata field. Numeric and datetime fields support all four directions (asc, desc, exists, not_exists); text/boolean fields only support exists/not_exists.", + "type": "string" + } + }, + "required": [ + "field" + ], + "type": "object" + }, + "maxItems": 3, + "type": "array" + }, + "keyword_match_mode": { + "description": "Controls which documents become candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term and ranks results according to BM25 relevance. When omitted on an update, the existing stored value stays unchanged; when never set, search falls back to 'and'.", + "enum": [ + "and", + "or" + ], + "type": "string" + } + }, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "rewrite_model": { + "description": "A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "rewrite_query": { + "default": false, + "type": "boolean" + }, + "score_threshold": { + "description": "Minimum similarity score a chunk must reach to be returned. Defaults to 0.4.", + "type": "number" + }, + "source": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "source_params": { + "oneOf": [ + { + "properties": { + "exclude_items": { + "description": "List of path patterns to exclude. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /admin/** matches /admin/users and /admin/settings/advanced). Most accounts have a limit of 10 rules; contact support to raise it.", + "items": { + "type": "string" + }, + "maxItems": 10, + "type": "array" + }, + "include_items": { + "description": "List of path patterns to include. Uses micromatch glob syntax: * matches within a path segment, ** matches across path segments (e.g., /blog/** matches /blog/post and /blog/2024/post). Most accounts have a limit of 10 rules; contact support to raise it.", + "items": { + "type": "string" + }, + "maxItems": 10, + "type": "array" + }, + "prefix": { + "type": "string" + }, + "r2_jurisdiction": { + "type": "string" + }, + "web_crawler": { + "default": { + "parse_type": "sitemap" + }, + "properties": { + "discover_options": { + "description": "Options for parse_type 'discover', where Browser Run discovers URLs through link following and sitemaps. Ignored for 'sitemap'.", + "properties": { + "depth": { + "default": 5, + "description": "Maximum link-follow depth from the seed URL.", + "type": "number" + }, + "include_external_links": { + "default": false, + "description": "Follow links that point outside the source domain. Must stay `false` because discover crawls only cover the zone you own.", + "type": "boolean" + }, + "include_subdomains": { + "default": false, + "description": "Follow links to subdomains of the source host.", + "type": "boolean" + }, + "limit": { + "default": 100000, + "description": "Maximum number of pages to crawl (1-100000).", + "type": "number" + }, + "max_age": { + "default": 86400, + "description": "Maximum content age in seconds to accept (0–604800).", + "type": "number" + }, + "source": { + "default": "all", + "description": "Where the crawler looks for URLs: 'sitemaps' reads sitemap XML only, 'links' follows page links only, 'all' does both.", + "enum": [ + "all", + "sitemaps", + "links" + ], + "type": "string" + } + }, + "type": "object" + }, + "parse_options": { + "properties": { + "content_selector": { + "description": "List of path-to-selector mappings for extracting specific content from crawled pages. Each entry pairs a URL glob pattern with a CSS selector. The first matching path wins. The crawler stores and indexes only the matched HTML fragment. Omit the field to disable content selection; the API rejects empty arrays.", + "items": { + "properties": { + "path": { + "description": "Glob pattern to match against the page URL path. Uses standard glob syntax: * matches within a segment, ** crosses directories.", + "type": "string" + }, + "selector": { + "description": "CSS selector to extract content from pages matching the path pattern. Disallowed characters: ;, `, $, {, }, \\. Must target a single element; if multiple elements match, the crawler ignores the selector and uses the full page.", + "type": "string" + } + }, + "required": [ + "path", + "selector" + ], + "type": "object" + }, + "maxItems": 10, + "minItems": 1, + "type": "array" + }, + "include_headers": { + "additionalProperties": { + "type": "string" + }, + "description": "Up to 5 custom HTTP headers sent with each crawl request. Names must use RFC-7230 token characters, excluding spaces, colons, and control characters. Values must use HTAB and printable ASCII only, excluding CR and LF.", + "type": "object" + }, + "include_images": { + "default": false, + "type": "boolean" + }, + "specific_sitemaps": { + "description": "List of specific sitemap URLs to use for crawling. Only valid when parse_type is 'sitemap'.", + "items": { + "type": "string" + }, + "maxItems": 10, + "type": "array" + }, + "use_browser_rendering": { + "default": true, + "type": "boolean" + } + }, + "type": "object" + }, + "parse_type": { + "default": "sitemap", + "description": "How the crawler finds URLs. 'sitemap' reads XML sitemaps; 'discover' follows links recursively and requires the source to belong to a Verified zone on this account.", + "enum": [ + "sitemap", + "discover" + ], + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + { + "type": "null" + } + ] + }, + "summarization": { + "default": false, + "type": "boolean" + }, + "summarization_model": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "sync_interval": { + "description": "Interval between automatic syncs, in seconds. Allowed values: 900 (15min), 1800 (30min), 3600 (1h), 7200 (2h), 14400 (4h), 21600 (6h), 43200 (12h), 86400 (24h). Defaults to 21600 (6h); instances crawling a domain outside the account may be set to 86400.", + "enum": [ + 900, + 1800, + 3600, + 7200, + 14400, + 21600, + 43200, + 86400 + ], + "type": "integer" + }, + "system_prompt_ai_search": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "system_prompt_index_summarization": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "system_prompt_rewrite_query": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "token_id": { + "format": "uuid", + "type": "string" + } + }, + "type": "object" + }, + "instance_id": { + "type": "string" + }, + "namespace": { + "description": "Namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "instance_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update an AI Search instance." + }, + method: "PUT", + path: "/accounts/{account_id}/ai-search/namespaces/{namespace}/instances/{id}", + extensions: { + "x-cfPermissionsRequired": { + "enum": [ + "com.cloudflare.api.account.ai-search" + ], + "x-fern-enum": { + "com.cloudflare.api.account.ai-search": { + "name": "com_cloudflare_api_account_ai_search" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + }, + "x-forge-params": { + "id": { + "description": "AI Search instance ID." + }, + "namespace": { + "description": "Namespace to use for this operation." + }, + "source": { + "description": "R2 bucket name or HTTP(S) root website URL to index." + }, + "source_params": { + "description": "Optional data source settings as a JSON object." + } + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/ai-search/namespaces/${pathParam(args, "namespace")}/instances/${pathParam(args, "instance_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiSecurity/customTopics/schemas.ts b/src/generated/forge-mcp/aiSecurity/customTopics/schemas.ts new file mode 100644 index 00000000..206c9662 --- /dev/null +++ b/src/generated/forge-mcp/aiSecurity/customTopics/schemas.ts @@ -0,0 +1,42 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `waf-product-api-bundle_custom-topic`. + */ +export const waf_product_api_bundle_custom_topic: JsonSchema = { + "properties": { + "label": { + "description": "Unique label identifier. Must contain only lowercase letters (a–z), digits (0–9), and hyphens.", + "type": "string" + }, + "topic": { + "description": "Description of the topic category. Must contain only printable ASCII characters.", + "type": "string" + } + }, + "required": [ + "label", + "topic" + ], + "type": "object" +}; + +/** + * The schema of `waf-product-api-bundle_custom-topics`. + */ +export const waf_product_api_bundle_custom_topics: JsonSchema = { + "properties": { + "topics": { + "description": "Custom topic categories for AI Security for Apps content detection.", + "items": { + "$ref": "#/$defs/waf-product-api-bundle_custom-topic" + }, + "maxItems": 20, + "type": "array" + } + }, + "type": "object" +}; diff --git a/src/generated/forge-mcp/aiSecurity/customTopics/tools.ts b/src/generated/forge-mcp/aiSecurity/customTopics/tools.ts new file mode 100644 index 00000000..ebb34de3 --- /dev/null +++ b/src/generated/forge-mcp/aiSecurity/customTopics/tools.ts @@ -0,0 +1,81 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { + waf_product_api_bundle_custom_topic, + waf_product_api_bundle_custom_topics, +} from "./schemas.js"; + +/** + * The tools of `ai_security.custom_topics`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_security_custom_topics_get", + title: "Get the AI Security for Apps custom topics of a zone.", + description: "Get the custom topic categories defined for the zone. While AI Security for Apps is enabled, it scores every incoming prompt against these topics and writes the scores to the `cf.llm.prompt.custom_topic_categories` field, keyed by topic label. Topics can be configured while the detection is disabled, but no prompt is scored until you enable it.", + inputSchema: { + type: "object", + properties: { + "zone_id": { + "description": "Defines the zone.", + "type": "string" + } + }, + required: [ + "zone_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get the AI Security for Apps custom topics of a zone." + }, + method: "GET", + path: "/zones/{zone_id}/ai-security/custom-topics", + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/ai-security/custom-topics`, + }), + }, + { + name: "ai_security_custom_topics_update", + title: "Update the AI Security for Apps custom topics of a zone.", + description: "Update the custom topic list of the zone, overwriting it entirely with the topics in the request, so include\nevery topic you want to keep. Changes can take up to a minute to propagate.\n\nEach entry has a `label`, used to reference the topic in rule expressions and analytics, and a `topic`\ndescription, which the classifier scores prompts against while AI Security for Apps is enabled. The following\nrules apply:\n\n- A zone can hold at most 20 topics.\n- `label` must be 2–20 characters, using only lowercase letters (a–z), digits (0–9), and hyphens.\n- `topic` must be 2–50 printable ASCII characters.\n- Labels must be unique within the zone, and so must topic descriptions.\n\nConfirm with the user before calling this tool. This operation overwrites the AI Security for Apps custom topics for a zone.", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/waf-product-api-bundle_custom-topics" + }, + "zone_id": { + "description": "Defines the zone.", + "type": "string" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "waf-product-api-bundle_custom-topic": waf_product_api_bundle_custom_topic, + "waf-product-api-bundle_custom-topics": waf_product_api_bundle_custom_topics, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update the AI Security for Apps custom topics of a zone." + }, + method: "PUT", + path: "/zones/{zone_id}/ai-security/custom-topics", + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/ai-security/custom-topics`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/aiSecurity/schemas.ts b/src/generated/forge-mcp/aiSecurity/schemas.ts new file mode 100644 index 00000000..16adc1fa --- /dev/null +++ b/src/generated/forge-mcp/aiSecurity/schemas.ts @@ -0,0 +1,18 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../_/tool.js"; + +/** + * The schema of `waf-product-api-bundle_settings`. + */ +export const waf_product_api_bundle_settings: JsonSchema = { + "description": "AI Security for Apps enablement status for a zone.", + "properties": { + "enabled": { + "description": "Whether AI Security for Apps is enabled on the zone.", + "type": "boolean" + } + }, + "type": "object" +}; diff --git a/src/generated/forge-mcp/aiSecurity/tools.ts b/src/generated/forge-mcp/aiSecurity/tools.ts new file mode 100644 index 00000000..45760574 --- /dev/null +++ b/src/generated/forge-mcp/aiSecurity/tools.ts @@ -0,0 +1,77 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../_/tool.js"; +import { waf_product_api_bundle_settings } from "./schemas.js"; + +/** + * The tools of `ai_security`. + */ +export const tools: readonly Tool[] = [ + { + name: "ai_security_get", + title: "Get the AI Security for Apps status for a zone.", + description: "Get the current AI Security for Apps status for the zone. While enabled, Cloudflare scans prompts sent to endpoints labeled `cf-llm` for personally identifiable information, unsafe topics, and prompt injection attempts.", + inputSchema: { + type: "object", + properties: { + "zone_id": { + "description": "Defines the zone.", + "type": "string" + } + }, + required: [ + "zone_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get the AI Security for Apps status for a zone." + }, + method: "GET", + path: "/zones/{zone_id}/ai-security/settings", + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/ai-security/settings`, + }), + }, + { + name: "ai_security_update", + title: "Update the AI Security for Apps status for a zone.", + description: "Update the AI Security for Apps status for the zone, enabling or disabling the detection. The detection results are exposed as `cf.llm.prompt.*` fields for use in custom rules and rate limiting rules; changes can take up to a minute to propagate.\n\nConfirm with the user before calling this tool. This operation toggles AI Security for Apps for a zone.", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/waf-product-api-bundle_settings" + }, + "zone_id": { + "description": "Defines the zone.", + "type": "string" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "waf-product-api-bundle_settings": waf_product_api_bundle_settings, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update the AI Security for Apps status for a zone." + }, + method: "PUT", + path: "/zones/{zone_id}/ai-security/settings", + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/ai-security/settings`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/alerting/availableAlerts/tools.ts b/src/generated/forge-mcp/alerting/availableAlerts/tools.ts new file mode 100644 index 00000000..27276edb --- /dev/null +++ b/src/generated/forge-mcp/alerting/availableAlerts/tools.ts @@ -0,0 +1,48 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `alerting.available_alerts`. + */ +export const tools: readonly Tool[] = [ + { + name: "alerting_available_alerts_list", + title: "Get Alert Types", + description: "Gets a list of all alert types for which an account is eligible.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Alert Types" + }, + method: "GET", + path: "/accounts/{account_id}/alerting/v3/available_alerts", + extensions: { + "x-api-token-group": [ + "Zero Trust: PII Read", + "Notifications Write", + "Notifications Read", + "Account Settings Write", + "Account Settings Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/available_alerts`, + }), + }, +]; diff --git a/src/generated/forge-mcp/alerting/destinations/eligible/tools.ts b/src/generated/forge-mcp/alerting/destinations/eligible/tools.ts new file mode 100644 index 00000000..8cf66616 --- /dev/null +++ b/src/generated/forge-mcp/alerting/destinations/eligible/tools.ts @@ -0,0 +1,39 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `alerting.destinations.eligible`. + */ +export const tools: readonly Tool[] = [ + { + name: "alerting_destinations_eligible_get", + title: "Get delivery mechanism eligibility", + description: "Get a list of all delivery mechanism types for which an account is eligible.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get delivery mechanism eligibility" + }, + method: "GET", + path: "/accounts/{account_id}/alerting/v3/destinations/eligible", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/destinations/eligible`, + }), + }, +]; diff --git a/src/generated/forge-mcp/alerting/destinations/pagerduty/tools.ts b/src/generated/forge-mcp/alerting/destinations/pagerduty/tools.ts new file mode 100644 index 00000000..123d6863 --- /dev/null +++ b/src/generated/forge-mcp/alerting/destinations/pagerduty/tools.ts @@ -0,0 +1,164 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `alerting.destinations.pagerduty`. + */ +export const tools: readonly Tool[] = [ + { + name: "alerting_destinations_pagerduty_create", + title: "Create PagerDuty integration token", + description: "Creates a new token for integrating with PagerDuty.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create PagerDuty integration token" + }, + method: "POST", + path: "/accounts/{account_id}/alerting/v3/destinations/pagerduty/connect", + extensions: { + "x-api-token-group": [ + "Notifications Write", + "Account Settings Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/destinations/pagerduty/connect`, + }), + }, + { + name: "alerting_destinations_pagerduty_delete", + title: "Delete PagerDuty Services", + description: "Deletes all the PagerDuty Services connected to the account.\n\nConfirm with the user before calling this tool. This operation deletes all PagerDuty services connected to the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete PagerDuty Services" + }, + method: "DELETE", + path: "/accounts/{account_id}/alerting/v3/destinations/pagerduty", + extensions: { + "x-api-token-group": [ + "Notifications Write", + "Account Settings Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/destinations/pagerduty`, + }), + }, + { + name: "alerting_destinations_pagerduty_get", + title: "List PagerDuty services", + description: "Get a list of all configured PagerDuty services.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List PagerDuty services" + }, + method: "GET", + path: "/accounts/{account_id}/alerting/v3/destinations/pagerduty", + extensions: { + "x-api-token-group": [ + "Zero Trust: PII Read", + "Notifications Write", + "Notifications Read", + "Account Settings Write", + "Account Settings Read" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": false, + "pro": false + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/destinations/pagerduty`, + }), + }, + { + name: "alerting_destinations_pagerduty_link", + title: "Connect PagerDuty", + description: "Links PagerDuty with the account using the integration token.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "token_id": { + "description": "The token integration key", + "type": "string" + } + }, + required: [ + "account_id", + "token_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Connect PagerDuty" + }, + method: "GET", + path: "/accounts/{account_id}/alerting/v3/destinations/pagerduty/connect/{token_id}", + extensions: { + "x-api-token-group": [ + "Notifications Write", + "Account Settings Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/destinations/pagerduty/connect/${pathParam(args, "token_id")}`, + }), + }, +]; diff --git a/src/generated/forge-mcp/alerting/destinations/webhooks/schemas.ts b/src/generated/forge-mcp/alerting/destinations/webhooks/schemas.ts new file mode 100644 index 00000000..6d164aa6 --- /dev/null +++ b/src/generated/forge-mcp/alerting/destinations/webhooks/schemas.ts @@ -0,0 +1,28 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../_/tool.js"; + +/** + * The schema of `aaa_components-schemas-name`. + */ +export const aaa_components_schemas_name: JsonSchema = { + "description": "The name of the webhook destination. This will be included in the request body when you receive a webhook notification.", + "type": "string" +}; + +/** + * The schema of `aaa_secret`. + */ +export const aaa_secret: JsonSchema = { + "description": "Optional secret that will be passed in the `cf-webhook-auth` header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body.", + "type": "string" +}; + +/** + * The schema of `aaa_url`. + */ +export const aaa_url: JsonSchema = { + "description": "The POST endpoint to call when dispatching a notification.", + "type": "string" +}; diff --git a/src/generated/forge-mcp/alerting/destinations/webhooks/tools.ts b/src/generated/forge-mcp/alerting/destinations/webhooks/tools.ts new file mode 100644 index 00000000..7e579d6f --- /dev/null +++ b/src/generated/forge-mcp/alerting/destinations/webhooks/tools.ts @@ -0,0 +1,293 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { aaa_components_schemas_name, aaa_secret, aaa_url } from "./schemas.js"; + +/** + * The tools of `alerting.destinations.webhooks`. + */ +export const tools: readonly Tool[] = [ + { + name: "alerting_destinations_webhooks_create", + title: "Create a webhook", + description: "Creates a new webhook destination.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "body": { + "properties": { + "name": { + "$ref": "#/$defs/aaa_components-schemas-name", + "description": "The name of the webhook destination. This will be included in the request body when you receive a webhook notification." + }, + "secret": { + "$ref": "#/$defs/aaa_secret", + "description": "Optional secret that will be passed in the `cf-webhook-auth` header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body." + }, + "url": { + "$ref": "#/$defs/aaa_url", + "description": "The POST endpoint to call when dispatching a notification." + } + }, + "required": [ + "name", + "url" + ], + "type": "object" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "aaa_components-schemas-name": aaa_components_schemas_name, + "aaa_secret": aaa_secret, + "aaa_url": aaa_url, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a webhook" + }, + method: "POST", + path: "/accounts/{account_id}/alerting/v3/destinations/webhooks", + extensions: { + "x-api-token-group": [ + "Notifications Write", + "Account Settings Write" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": false, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/destinations/webhooks`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "alerting_destinations_webhooks_delete", + title: "Delete a webhook", + description: "Delete a configured webhook destination.\n\nConfirm with the user before calling this tool. This operation deletes the webhook destination.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "webhook_id": { + "description": "The unique identifier of a webhook", + "type": "string" + } + }, + required: [ + "account_id", + "webhook_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a webhook" + }, + method: "DELETE", + path: "/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}", + extensions: { + "x-api-token-group": [ + "Notifications Write", + "Account Settings Write" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": false, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/destinations/webhooks/${pathParam(args, "webhook_id")}`, + }), + }, + { + name: "alerting_destinations_webhooks_get", + title: "Get a webhook", + description: "Get details for a single webhooks destination.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "webhook_id": { + "description": "The unique identifier of a webhook", + "type": "string" + } + }, + required: [ + "account_id", + "webhook_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a webhook" + }, + method: "GET", + path: "/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}", + extensions: { + "x-api-token-group": [ + "Zero Trust: PII Read", + "Notifications Write", + "Notifications Read", + "Account Settings Write", + "Account Settings Read" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": false, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/destinations/webhooks/${pathParam(args, "webhook_id")}`, + }), + }, + { + name: "alerting_destinations_webhooks_list", + title: "List webhooks", + description: "Gets a list of all configured webhook destinations.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List webhooks" + }, + method: "GET", + path: "/accounts/{account_id}/alerting/v3/destinations/webhooks", + extensions: { + "x-api-token-group": [ + "Zero Trust: PII Read", + "Notifications Write", + "Notifications Read", + "Account Settings Write", + "Account Settings Read" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": false, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/destinations/webhooks`, + }), + }, + { + name: "alerting_destinations_webhooks_update", + title: "Update a webhook", + description: "Update a webhook destination.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "body": { + "properties": { + "name": { + "$ref": "#/$defs/aaa_components-schemas-name", + "description": "The name of the webhook destination. This will be included in the request body when you receive a webhook notification." + }, + "secret": { + "$ref": "#/$defs/aaa_secret", + "description": "Optional secret that will be passed in the `cf-webhook-auth` header when dispatching generic webhook notifications or formatted for supported destinations. Secrets are not returned in any API response body." + }, + "url": { + "$ref": "#/$defs/aaa_url", + "description": "The POST endpoint to call when dispatching a notification." + } + }, + "required": [ + "name", + "url" + ], + "type": "object" + }, + "webhook_id": { + "description": "The unique identifier of a webhook", + "type": "string" + } + }, + required: [ + "account_id", + "webhook_id", + "body" + ], + $defs: { + "aaa_components-schemas-name": aaa_components_schemas_name, + "aaa_secret": aaa_secret, + "aaa_url": aaa_url, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update a webhook" + }, + method: "PUT", + path: "/accounts/{account_id}/alerting/v3/destinations/webhooks/{webhook_id}", + extensions: { + "x-api-token-group": [ + "Notifications Write", + "Account Settings Write" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": false, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/destinations/webhooks/${pathParam(args, "webhook_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/alerting/history/schemas.ts b/src/generated/forge-mcp/alerting/history/schemas.ts new file mode 100644 index 00000000..4191ec70 --- /dev/null +++ b/src/generated/forge-mcp/alerting/history/schemas.ts @@ -0,0 +1,21 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `aaa_before`. + */ +export const aaa_before: JsonSchema = { + "description": "Limit the returned results to history records older than the specified date. This must be a timestamp that conforms to RFC3339.", + "format": "date-time", + "type": "string" +}; + +/** + * The schema of `aaa_per_page`. + */ +export const aaa_per_page: JsonSchema = { + "description": "Number of items per page.", + "type": "number" +}; diff --git a/src/generated/forge-mcp/alerting/history/tools.ts b/src/generated/forge-mcp/alerting/history/tools.ts new file mode 100644 index 00000000..8af02a14 --- /dev/null +++ b/src/generated/forge-mcp/alerting/history/tools.ts @@ -0,0 +1,78 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { aaa_before, aaa_per_page } from "./schemas.js"; + +/** + * The tools of `alerting.history`. + */ +export const tools: readonly Tool[] = [ + { + name: "alerting_history_list", + title: "List History", + description: "Gets a list of history records for notifications sent to an account. The records are displayed for last `x` number of days based on the zone plan (free = 30, pro = 30, biz = 30, ent = 90).", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "before": { + "$ref": "#/$defs/aaa_before", + "description": "Limit the returned results to history records older than the specified date. This must be a timestamp that conforms to RFC3339." + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "number" + }, + "per_page": { + "$ref": "#/$defs/aaa_per_page", + "default": 25, + "description": "Number of items per page." + }, + "since": { + "description": "Limit the returned results to history records newer than the specified date. This must be a timestamp that conforms to RFC3339.", + "format": "date-time", + "type": "string" + } + }, + required: [ + "account_id" + ], + $defs: { + "aaa_before": aaa_before, + "aaa_per_page": aaa_per_page, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List History" + }, + method: "GET", + path: "/accounts/{account_id}/alerting/v3/history", + extensions: { + "x-api-token-group": [ + "Zero Trust: PII Read", + "Notifications Write", + "Notifications Read", + "Account Settings Write", + "Account Settings Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/history`, + query: [ + ["per_page", args["per_page"], true], + ["before", args["before"], true], + ["page", args["page"], true], + ["since", args["since"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/alerting/policies/email/tools.ts b/src/generated/forge-mcp/alerting/policies/email/tools.ts new file mode 100644 index 00000000..6c407434 --- /dev/null +++ b/src/generated/forge-mcp/alerting/policies/email/tools.ts @@ -0,0 +1,111 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `alerting.policies.email`. + */ +export const tools: readonly Tool[] = [ + { + name: "alerting_policies_email_details", + title: "Show email unsubscribe details", + description: "Shows details for unsubscribing an email address from a notification policy.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "email": { + "type": "string" + }, + "policy_id": { + "description": "The unique identifier of a notification policy", + "type": "string" + }, + "token": { + "type": "string" + } + }, + required: [ + "account_id", + "policy_id", + "email", + "token" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Show email unsubscribe details" + }, + method: "GET", + path: "/accounts/{account_id}/alerting/v3/policies/{policy_id}/email/unsubscribe", + extensions: { + "x-api-token-group": [ + "Zero Trust: PII Read", + "Notifications Write", + "Notifications Read", + "Account Settings Write", + "Account Settings Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/policies/${pathParam(args, "policy_id")}/email/unsubscribe`, + query: [ + ["email", args["email"], true], + ["token", args["token"], true], + ], + }), + }, + { + name: "alerting_policies_email_unsubscribe", + title: "Unsubscribe email from a Notification policy", + description: "Unsubscribes an email address from a notification policy.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "email": { + "type": "string" + }, + "policy_id": { + "description": "The unique identifier of a notification policy", + "type": "string" + }, + "token": { + "type": "string" + } + }, + required: [ + "account_id", + "policy_id", + "email", + "token" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Unsubscribe email from a Notification policy" + }, + method: "POST", + path: "/accounts/{account_id}/alerting/v3/policies/{policy_id}/email/unsubscribe", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/policies/${pathParam(args, "policy_id")}/email/unsubscribe`, + query: [ + ["email", args["email"], true], + ["token", args["token"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/alerting/policies/schemas.ts b/src/generated/forge-mcp/alerting/policies/schemas.ts new file mode 100644 index 00000000..9ed29c73 --- /dev/null +++ b/src/generated/forge-mcp/alerting/policies/schemas.ts @@ -0,0 +1,502 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `aaa_alert_interval`. + */ +export const aaa_alert_interval: JsonSchema = { + "description": "Optional specification of how often to re-alert from the same incident, not support on all alert types.", + "type": "string" +}; + +/** + * The schema of `aaa_alert_type`. + */ +export const aaa_alert_type: JsonSchema = { + "description": "Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.", + "enum": [ + "abuse_report_alert", + "access_custom_certificate_expiration_type", + "advanced_ddos_attack_l4_alert", + "advanced_ddos_attack_l7_alert", + "advanced_http_alert_error", + "bgp_hijack_notification", + "billing_usage_alert", + "block_notification_block_removed", + "block_notification_new_block", + "block_notification_review_rejected", + "bot_traffic_basic_alert", + "brand_protection_alert", + "brand_protection_digest", + "clickhouse_alert_fw_anomaly", + "clickhouse_alert_fw_ent_anomaly", + "cloudforce_one_request_notification", + "cni_maintenance_notification", + "custom_analytics", + "custom_bot_detection_alert", + "custom_ssl_certificate_event_type", + "dedicated_ssl_certificate_event_type", + "device_connectivity_anomaly_alert", + "dos_attack_l4", + "dos_attack_l7", + "expiring_service_token_alert", + "failing_logpush_job_disabled_alert", + "fbm_auto_advertisement", + "fbm_dosd_attack", + "fbm_volumetric_attack", + "health_check_status_notification", + "hostname_aop_custom_certificate_expiration_type", + "http_alert_edge_error", + "http_alert_origin_error", + "image_notification", + "image_resizing_notification", + "incident_alert", + "load_balancing_health_alert", + "load_balancing_pool_enablement_alert", + "logo_match_alert", + "magic_tunnel_health_check_event", + "magic_wan_tunnel_health", + "maintenance_event_notification", + "mtls_certificate_store_certificate_expiration_type", + "pages_event_alert", + "radar_notification", + "real_origin_monitoring", + "scriptmonitor_alert_new_code_change_detections", + "scriptmonitor_alert_new_hosts", + "scriptmonitor_alert_new_malicious_hosts", + "scriptmonitor_alert_new_malicious_scripts", + "scriptmonitor_alert_new_malicious_url", + "scriptmonitor_alert_new_max_length_resource_url", + "scriptmonitor_alert_new_resources", + "secondary_dns_all_primaries_failing", + "secondary_dns_primaries_failing", + "secondary_dns_warning", + "secondary_dns_zone_successfully_updated", + "secondary_dns_zone_validation_warning", + "security_insights_alert", + "sentinel_alert", + "stream_live_notifications", + "synthetic_test_latency_alert", + "synthetic_test_low_availability_alert", + "traffic_anomalies_alert", + "tunnel_health_event", + "tunnel_update_event", + "universal_ssl_event_type", + "web_analytics_metrics_update", + "zone_aop_custom_certificate_expiration_type" + ], + "type": "string" +}; + +/** + * The schema of `aaa_enabled`. + */ +export const aaa_enabled: JsonSchema = { + "description": "Whether or not the Notification policy is enabled.", + "type": "boolean" +}; + +/** + * The schema of `aaa_filters`. + */ +export const aaa_filters: JsonSchema = { + "description": "Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for more details.", + "properties": { + "actions": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + }, + "affected_asns": { + "description": "Used for configuring radar_notification", + "items": { + "type": "string" + }, + "type": "array" + }, + "affected_components": { + "description": "Used for configuring incident_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "affected_locations": { + "description": "Used for configuring radar_notification", + "items": { + "type": "string" + }, + "type": "array" + }, + "airport_code": { + "description": "Used for configuring maintenance_event_notification", + "items": { + "type": "string" + }, + "type": "array" + }, + "alert_trigger_preferences": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + }, + "alert_trigger_preferences_value": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + }, + "enabled": { + "description": "Used for configuring load_balancing_pool_enablement_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "environment": { + "description": "Used for configuring pages_event_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "event": { + "description": "Used for configuring pages_event_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "event_source": { + "description": "Used for configuring load_balancing_health_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "event_type": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + }, + "group_by": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + }, + "health_check_id": { + "description": "Used for configuring health_check_status_notification", + "items": { + "type": "string" + }, + "type": "array" + }, + "incident_impact": { + "description": "Used for configuring incident_alert", + "items": { + "enum": [ + "INCIDENT_IMPACT_NONE", + "INCIDENT_IMPACT_MINOR", + "INCIDENT_IMPACT_MAJOR", + "INCIDENT_IMPACT_CRITICAL" + ], + "type": "string" + }, + "type": "array" + }, + "input_id": { + "description": "Used for configuring stream_live_notifications", + "items": { + "type": "string" + }, + "type": "array" + }, + "insight_class": { + "description": "Used for configuring security_insights_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "limit": { + "description": "Used for configuring billing_usage_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "logo_tag": { + "description": "Used for configuring logo_match_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "megabits_per_second": { + "description": "Used for configuring advanced_ddos_attack_l4_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "new_health": { + "description": "Used for configuring load_balancing_health_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "new_status": { + "description": "Used for configuring tunnel_health_event", + "items": { + "type": "string" + }, + "type": "array" + }, + "packets_per_second": { + "description": "Used for configuring advanced_ddos_attack_l4_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "pool_id": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + }, + "pop_names": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + }, + "product": { + "description": "Used for configuring billing_usage_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "project_id": { + "description": "Used for configuring pages_event_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "protocol": { + "description": "Used for configuring advanced_ddos_attack_l4_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "query_tag": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + }, + "requests_per_second": { + "description": "Used for configuring advanced_ddos_attack_l7_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "selectors": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + }, + "services": { + "description": "Used for configuring clickhouse_alert_fw_ent_anomaly", + "items": { + "type": "string" + }, + "type": "array" + }, + "slo": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + }, + "status": { + "description": "Used for configuring health_check_status_notification", + "items": { + "type": "string" + }, + "type": "array" + }, + "target_hostname": { + "description": "Used for configuring advanced_ddos_attack_l7_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "target_ip": { + "description": "Used for configuring advanced_ddos_attack_l4_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "target_zone_name": { + "description": "Used for configuring advanced_ddos_attack_l7_alert", + "items": { + "type": "string" + }, + "type": "array" + }, + "token_id": { + "description": "Access service token IDs to include for expiring_service_token_alert. Omit this property to include all current and future service tokens.", + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array" + }, + "traffic_exclusions": { + "description": "Used for configuring traffic_anomalies_alert", + "items": { + "enum": [ + "security_events" + ], + "type": "string" + }, + "type": "array" + }, + "tunnel_id": { + "description": "Used for configuring tunnel_health_event", + "items": { + "type": "string" + }, + "type": "array" + }, + "tunnel_name": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + }, + "where": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + }, + "zones": { + "description": "Usage depends on specific alert type", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" +}; + +/** + * The schema of `aaa_mechanisms`. + */ +export const aaa_mechanisms: JsonSchema = { + "description": "List of IDs that will be used when dispatching a notification. IDs for email type will be the email address.", + "properties": { + "email": { + "items": { + "$ref": "#/$defs/aaa_mechanisms_emailItem" + }, + "type": "array" + }, + "pagerduty": { + "items": { + "$ref": "#/$defs/aaa_mechanisms_pagerdutyItem" + }, + "type": "array" + }, + "webhooks": { + "items": { + "$ref": "#/$defs/aaa_mechanisms_webhooksItem" + }, + "type": "array" + } + }, + "type": "object" +}; + +/** + * The schema of `aaa_mechanisms_emailItem`. + */ +export const aaa_mechanisms_emailItem: JsonSchema = { + "properties": { + "id": { + "description": "The email address", + "type": "string" + } + }, + "type": "object" +}; + +/** + * The schema of `aaa_mechanisms_pagerdutyItem`. + */ +export const aaa_mechanisms_pagerdutyItem: JsonSchema = { + "properties": { + "id": { + "$ref": "#/$defs/aaa_uuid", + "description": "UUID" + } + }, + "type": "object" +}; + +/** + * The schema of `aaa_mechanisms_webhooksItem`. + */ +export const aaa_mechanisms_webhooksItem: JsonSchema = { + "properties": { + "id": { + "$ref": "#/$defs/aaa_uuid", + "description": "UUID" + } + }, + "type": "object" +}; + +/** + * The schema of `aaa_schemas-description`. + */ +export const aaa_schemas_description: JsonSchema = { + "description": "Optional description for the Notification policy.", + "type": "string" +}; diff --git a/src/generated/forge-mcp/alerting/policies/tools.ts b/src/generated/forge-mcp/alerting/policies/tools.ts new file mode 100644 index 00000000..586add9d --- /dev/null +++ b/src/generated/forge-mcp/alerting/policies/tools.ts @@ -0,0 +1,397 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { aaa_schemas_name, aaa_uuid } from "../schemas.js"; +import { + aaa_alert_interval, + aaa_alert_type, + aaa_enabled, + aaa_filters, + aaa_mechanisms, + aaa_mechanisms_emailItem, + aaa_mechanisms_pagerdutyItem, + aaa_mechanisms_webhooksItem, + aaa_schemas_description, +} from "./schemas.js"; + +/** + * The tools of `alerting.policies`. + */ +export const tools: readonly Tool[] = [ + { + name: "alerting_policies_create", + title: "Create a Notification policy", + description: "Creates a new Notification policy.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "body": { + "properties": { + "alert_interval": { + "$ref": "#/$defs/aaa_alert_interval", + "description": "Optional specification of how often to re-alert from the same incident, not support on all alert types." + }, + "alert_type": { + "$ref": "#/$defs/aaa_alert_type", + "description": "Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values." + }, + "description": { + "$ref": "#/$defs/aaa_schemas-description", + "description": "Optional description for the Notification policy." + }, + "enabled": { + "$ref": "#/$defs/aaa_enabled", + "default": true, + "description": "Whether or not the Notification policy is enabled." + }, + "filters": { + "$ref": "#/$defs/aaa_filters", + "description": "Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for more details." + }, + "mechanisms": { + "$ref": "#/$defs/aaa_mechanisms", + "description": "List of IDs that will be used when dispatching a notification. IDs for email type will be the email address." + }, + "name": { + "$ref": "#/$defs/aaa_schemas-name", + "description": "Name of the policy." + } + }, + "required": [ + "alert_type", + "enabled", + "mechanisms", + "name" + ], + "type": "object" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "aaa_alert_interval": aaa_alert_interval, + "aaa_alert_type": aaa_alert_type, + "aaa_enabled": aaa_enabled, + "aaa_filters": aaa_filters, + "aaa_mechanisms": aaa_mechanisms, + "aaa_mechanisms_emailItem": aaa_mechanisms_emailItem, + "aaa_mechanisms_pagerdutyItem": aaa_mechanisms_pagerdutyItem, + "aaa_mechanisms_webhooksItem": aaa_mechanisms_webhooksItem, + "aaa_schemas-description": aaa_schemas_description, + "aaa_schemas-name": aaa_schemas_name, + "aaa_uuid": aaa_uuid, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a Notification policy" + }, + method: "POST", + path: "/accounts/{account_id}/alerting/v3/policies", + extensions: { + "x-api-token-group": [ + "Notifications Write", + "Account Settings Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/policies`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "alerting_policies_delete", + title: "Delete a Notification policy", + description: "Delete a Notification policy.\n\nConfirm with the user before calling this tool. This operation deletes the notification policy.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "policy_id": { + "description": "The unique identifier of a notification policy", + "type": "string" + } + }, + required: [ + "account_id", + "policy_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a Notification policy" + }, + method: "DELETE", + path: "/accounts/{account_id}/alerting/v3/policies/{policy_id}", + extensions: { + "x-api-token-group": [ + "Notifications Write", + "Account Settings Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/policies/${pathParam(args, "policy_id")}`, + }), + }, + { + name: "alerting_policies_get", + title: "Get a Notification policy", + description: "Get details for a single policy.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "policy_id": { + "description": "The unique identifier of a notification policy", + "type": "string" + } + }, + required: [ + "account_id", + "policy_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a Notification policy" + }, + method: "GET", + path: "/accounts/{account_id}/alerting/v3/policies/{policy_id}", + extensions: { + "x-api-token-group": [ + "Zero Trust: PII Read", + "Notifications Write", + "Notifications Read", + "Account Settings Write", + "Account Settings Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/policies/${pathParam(args, "policy_id")}`, + }), + }, + { + name: "alerting_policies_list", + title: "List Notification policies", + description: "Get a list of all Notification policies.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Notification policies" + }, + method: "GET", + path: "/accounts/{account_id}/alerting/v3/policies", + extensions: { + "x-api-token-group": [ + "Zero Trust: PII Read", + "Notifications Write", + "Notifications Read", + "Account Settings Write", + "Account Settings Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/policies`, + }), + }, + { + name: "alerting_policies_test", + title: "Test a Notification policy", + description: "Send a test notification for a policy to verify delivery mechanisms are working as expected.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "body": { + "description": "Optional configuration for the test notification. When omitted, a default INFO-severity test alert is sent.", + "properties": { + "severity": { + "description": "Severity level for the test alert. Defaults to INFO (1) if omitted.", + "enum": [ + 0, + 1, + 2, + 3, + 4 + ], + "type": "integer" + }, + "source": { + "description": "Source identifier for the test alert.", + "type": "string" + }, + "state_correlation_id": { + "description": "Correlation ID for stateful test alerts. Required when state_event is set.", + "type": "string" + }, + "state_event": { + "description": "State event type for stateful test alerts. Use with state_correlation_id.", + "enum": [ + 0, + 1, + 2 + ], + "type": "integer" + } + }, + "type": "object" + }, + "policy_id": { + "description": "The unique identifier of a notification policy", + "type": "string" + } + }, + required: [ + "account_id", + "policy_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Test a Notification policy" + }, + method: "POST", + path: "/accounts/{account_id}/alerting/v3/policies/{policy_id}/test", + extensions: { + "x-api-token-group": [ + "Notifications Write", + "Account Settings Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/policies/${pathParam(args, "policy_id")}/test`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "alerting_policies_update", + title: "Update a Notification policy", + description: "Update a Notification policy.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "body": { + "properties": { + "alert_interval": { + "$ref": "#/$defs/aaa_alert_interval", + "description": "Optional specification of how often to re-alert from the same incident, not support on all alert types." + }, + "alert_type": { + "$ref": "#/$defs/aaa_alert_type", + "description": "Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values." + }, + "description": { + "$ref": "#/$defs/aaa_schemas-description", + "description": "Optional description for the Notification policy." + }, + "enabled": { + "$ref": "#/$defs/aaa_enabled", + "default": true, + "description": "Whether or not the Notification policy is enabled." + }, + "filters": { + "$ref": "#/$defs/aaa_filters", + "description": "Optional filters that allow you to be alerted only on a subset of events for that alert type based on some criteria. This is only available for select alert types. See alert type documentation for more details." + }, + "mechanisms": { + "$ref": "#/$defs/aaa_mechanisms", + "description": "List of IDs that will be used when dispatching a notification. IDs for email type will be the email address." + }, + "name": { + "$ref": "#/$defs/aaa_schemas-name", + "description": "Name of the policy." + } + }, + "type": "object" + }, + "policy_id": { + "description": "The unique identifier of a notification policy", + "type": "string" + } + }, + required: [ + "account_id", + "policy_id", + "body" + ], + $defs: { + "aaa_alert_interval": aaa_alert_interval, + "aaa_alert_type": aaa_alert_type, + "aaa_enabled": aaa_enabled, + "aaa_filters": aaa_filters, + "aaa_mechanisms": aaa_mechanisms, + "aaa_mechanisms_emailItem": aaa_mechanisms_emailItem, + "aaa_mechanisms_pagerdutyItem": aaa_mechanisms_pagerdutyItem, + "aaa_mechanisms_webhooksItem": aaa_mechanisms_webhooksItem, + "aaa_schemas-description": aaa_schemas_description, + "aaa_schemas-name": aaa_schemas_name, + "aaa_uuid": aaa_uuid, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update a Notification policy" + }, + method: "PUT", + path: "/accounts/{account_id}/alerting/v3/policies/{policy_id}", + extensions: { + "x-api-token-group": [ + "Notifications Write", + "Account Settings Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/policies/${pathParam(args, "policy_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/alerting/schemas.ts b/src/generated/forge-mcp/alerting/schemas.ts new file mode 100644 index 00000000..2e875aeb --- /dev/null +++ b/src/generated/forge-mcp/alerting/schemas.ts @@ -0,0 +1,28 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../_/tool.js"; + +/** + * The schema of `aaa_policy-id`. + */ +export const aaa_policy_id: JsonSchema = { + "description": "The unique identifier of a notification policy", + "type": "string" +}; + +/** + * The schema of `aaa_schemas-name`. + */ +export const aaa_schemas_name: JsonSchema = { + "description": "Name of the policy.", + "type": "string" +}; + +/** + * The schema of `aaa_uuid`. + */ +export const aaa_uuid: JsonSchema = { + "description": "UUID", + "type": "string" +}; diff --git a/src/generated/forge-mcp/alerting/silences/schemas.ts b/src/generated/forge-mcp/alerting/silences/schemas.ts new file mode 100644 index 00000000..931f8f16 --- /dev/null +++ b/src/generated/forge-mcp/alerting/silences/schemas.ts @@ -0,0 +1,54 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `aaa_silence-id`. + */ +export const aaa_silence_id: JsonSchema = { + "description": "Silence ID", + "type": "string" +}; + +/** + * The schema of `aaa_silence_create_request`. + */ +export const aaa_silence_create_request: JsonSchema = { + "properties": { + "end_time": { + "description": "When the silence ends.", + "type": "string" + }, + "policy_id": { + "$ref": "#/$defs/aaa_policy-id", + "description": "The unique identifier of a notification policy" + }, + "start_time": { + "description": "When the silence starts.", + "type": "string" + } + }, + "type": "object" +}; + +/** + * The schema of `aaa_silence_update_request`. + */ +export const aaa_silence_update_request: JsonSchema = { + "properties": { + "end_time": { + "description": "When the silence ends.", + "type": "string" + }, + "id": { + "$ref": "#/$defs/aaa_silence-id", + "description": "Silence ID" + }, + "start_time": { + "description": "When the silence starts.", + "type": "string" + } + }, + "type": "object" +}; diff --git a/src/generated/forge-mcp/alerting/silences/tools.ts b/src/generated/forge-mcp/alerting/silences/tools.ts new file mode 100644 index 00000000..9b548a2a --- /dev/null +++ b/src/generated/forge-mcp/alerting/silences/tools.ts @@ -0,0 +1,231 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { aaa_policy_id } from "../schemas.js"; +import { + aaa_silence_create_request, + aaa_silence_id, + aaa_silence_update_request, +} from "./schemas.js"; + +/** + * The tools of `alerting.silences`. + */ +export const tools: readonly Tool[] = [ + { + name: "alerting_silences_create", + title: "Create Silences", + description: "Creates a new silence for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "body": { + "items": { + "$ref": "#/$defs/aaa_silence_create_request" + }, + "type": "array" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "aaa_policy-id": aaa_policy_id, + "aaa_silence_create_request": aaa_silence_create_request, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create Silences" + }, + method: "POST", + path: "/accounts/{account_id}/alerting/v3/silences", + extensions: { + "x-api-token-group": [ + "Notifications Write", + "Account Settings Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/silences`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "alerting_silences_delete", + title: "Delete Silence", + description: "Deletes an existing silence for an account.\n\nConfirm with the user before calling this tool. This operation deletes the notification silence.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "silence_id": { + "description": "Silence ID", + "type": "string" + } + }, + required: [ + "account_id", + "silence_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Silence" + }, + method: "DELETE", + path: "/accounts/{account_id}/alerting/v3/silences/{silence_id}", + extensions: { + "x-api-token-group": [ + "Notifications Write", + "Account Settings Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/silences/${pathParam(args, "silence_id")}`, + }), + }, + { + name: "alerting_silences_get", + title: "Get Silence", + description: "Gets a specific silence for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "silence_id": { + "description": "Silence ID", + "type": "string" + } + }, + required: [ + "account_id", + "silence_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Silence" + }, + method: "GET", + path: "/accounts/{account_id}/alerting/v3/silences/{silence_id}", + extensions: { + "x-api-token-group": [ + "Zero Trust: PII Read", + "Notifications Write", + "Notifications Read", + "Account Settings Write", + "Account Settings Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/silences/${pathParam(args, "silence_id")}`, + }), + }, + { + name: "alerting_silences_list", + title: "List Silences", + description: "Gets a list of silences for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Silences" + }, + method: "GET", + path: "/accounts/{account_id}/alerting/v3/silences", + extensions: { + "x-api-token-group": [ + "Zero Trust: PII Read", + "Notifications Write", + "Notifications Read", + "Account Settings Write", + "Account Settings Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/silences`, + }), + }, + { + name: "alerting_silences_update", + title: "Update Silences", + description: "Updates existing silences for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "The account id", + "type": "string" + }, + "body": { + "items": { + "$ref": "#/$defs/aaa_silence_update_request" + }, + "type": "array" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "aaa_silence-id": aaa_silence_id, + "aaa_silence_update_request": aaa_silence_update_request, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update Silences" + }, + method: "PUT", + path: "/accounts/{account_id}/alerting/v3/silences", + extensions: { + "x-api-token-group": [ + "Notifications Write", + "Account Settings Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/alerting/v3/silences`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/alerts/clear/tools.ts b/src/generated/forge-mcp/alerts/clear/tools.ts new file mode 100644 index 00000000..2bb2ed08 --- /dev/null +++ b/src/generated/forge-mcp/alerts/clear/tools.ts @@ -0,0 +1,43 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `alerts.clear`. + */ +export const tools: readonly Tool[] = [ + { + name: "alerts_clear_edit", + title: "Update verification statuses of tracked URLs to awaiting by ID", + description: "Return a success message after updating verification statuses of tracked URLs to awaiting by ID", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update verification statuses of tracked URLs to awaiting by ID" + }, + method: "PATCH", + path: "/accounts/{account_id}/brand-protection/alerts/clear", + extensions: { + "x-api-token-group": [ + "Intel Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/brand-protection/alerts/clear`, + }), + }, +]; diff --git a/src/generated/forge-mcp/alerts/refute/tools.ts b/src/generated/forge-mcp/alerts/refute/tools.ts new file mode 100644 index 00000000..a15f5c64 --- /dev/null +++ b/src/generated/forge-mcp/alerts/refute/tools.ts @@ -0,0 +1,43 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `alerts.refute`. + */ +export const tools: readonly Tool[] = [ + { + name: "alerts_refute_edit", + title: "Update verification statuses of tracked URLs to disproven by ID", + description: "Return a success message after updating verification statuses of tracked URLs to disproven by ID", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update verification statuses of tracked URLs to disproven by ID" + }, + method: "PATCH", + path: "/accounts/{account_id}/brand-protection/alerts/refute", + extensions: { + "x-api-token-group": [ + "Intel Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/brand-protection/alerts/refute`, + }), + }, +]; diff --git a/src/generated/forge-mcp/alerts/tools.ts b/src/generated/forge-mcp/alerts/tools.ts new file mode 100644 index 00000000..9f73c780 --- /dev/null +++ b/src/generated/forge-mcp/alerts/tools.ts @@ -0,0 +1,77 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../_/tool.js"; + +/** + * The tools of `alerts`. + */ +export const tools: readonly Tool[] = [ + { + name: "alerts_edit", + title: "Update alerts on submitted domains by ID", + description: "Return a success message after updating alerts on submitted domains by ID", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update alerts on submitted domains by ID" + }, + method: "PATCH", + path: "/accounts/{account_id}/brand-protection/alerts", + extensions: { + "x-api-token-group": [ + "Intel Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/brand-protection/alerts`, + }), + }, + { + name: "alerts_get", + title: "Read all alerts on submitted domains", + description: "Return all alerts on submitted domains", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Read all alerts on submitted domains" + }, + method: "GET", + path: "/accounts/{account_id}/brand-protection/alerts", + extensions: { + "x-api-token-group": [ + "Intel Write", + "Intel Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/brand-protection/alerts`, + }), + }, +]; diff --git a/src/generated/forge-mcp/alerts/verify/tools.ts b/src/generated/forge-mcp/alerts/verify/tools.ts new file mode 100644 index 00000000..528cd21a --- /dev/null +++ b/src/generated/forge-mcp/alerts/verify/tools.ts @@ -0,0 +1,43 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `alerts.verify`. + */ +export const tools: readonly Tool[] = [ + { + name: "alerts_verify_edit", + title: "Update verification statuses of tracked URLs to confirmed by ID", + description: "Return a success message after updating verification statuses of tracked URLs to confirmed by ID", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update verification statuses of tracked URLs to confirmed by ID" + }, + method: "PATCH", + path: "/accounts/{account_id}/brand-protection/alerts/verify", + extensions: { + "x-api-token-group": [ + "Intel Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/brand-protection/alerts/verify`, + }), + }, +]; diff --git a/src/generated/forge-mcp/analytics/latency/colos/tools.ts b/src/generated/forge-mcp/analytics/latency/colos/tools.ts new file mode 100644 index 00000000..8bf69a5e --- /dev/null +++ b/src/generated/forge-mcp/analytics/latency/colos/tools.ts @@ -0,0 +1,50 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `analytics.latency.colos`. + */ +export const tools: readonly Tool[] = [ + { + name: "analytics_latency_colos_get", + title: "Argo Analytics for a zone at different PoPs", + description: "Retrieves Argo Smart Routing analytics broken down by geographic points of presence (PoPs). Shows latency improvements and routing efficiency per location.", + inputSchema: { + type: "object", + properties: { + "zone_id": { + "description": "Identifier", + "type": "string" + } + }, + required: [ + "zone_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Argo Analytics for a zone at different PoPs" + }, + method: "GET", + path: "/zones/{zone_id}/analytics/latency/colos", + extensions: { + "x-api-token-group": [ + "Analytics Read" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/analytics/latency/colos`, + }), + }, +]; diff --git a/src/generated/forge-mcp/analytics/latency/tools.ts b/src/generated/forge-mcp/analytics/latency/tools.ts new file mode 100644 index 00000000..87e065ed --- /dev/null +++ b/src/generated/forge-mcp/analytics/latency/tools.ts @@ -0,0 +1,66 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `analytics.latency`. + */ +export const tools: readonly Tool[] = [ + { + name: "analytics_latency_get", + title: "Argo Analytics for a zone", + description: "Retrieves aggregate Argo Smart Routing analytics for a zone, including latency improvements, bandwidth savings, and routing statistics.", + inputSchema: { + type: "object", + properties: { + "bins": { + "type": "string" + }, + "zone_id": { + "description": "Identifier", + "type": "string" + } + }, + required: [ + "zone_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Argo Analytics for a zone" + }, + method: "GET", + path: "/zones/{zone_id}/analytics/latency", + extensions: { + "x-api-token-group": [ + "Analytics Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#analytics:read" + ], + "x-fern-enum": { + "#analytics:read": { + "name": "analytics_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/analytics/latency`, + query: [ + ["bins", args["bins"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/analytics/query/dataSecurity/contentFindings/schemas.ts b/src/generated/forge-mcp/analytics/query/dataSecurity/contentFindings/schemas.ts new file mode 100644 index 00000000..0db9b8ec --- /dev/null +++ b/src/generated/forge-mcp/analytics/query/dataSecurity/contentFindings/schemas.ts @@ -0,0 +1,41 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../../_/tool.js"; + +/** + * The schema of `art_DataSecurityContentFindingsTopNQuery`. + */ +export const art_DataSecurityContentFindingsTopNQuery: JsonSchema = { + "description": "Returns the top N integrations for content findings.", + "properties": { + "filters": { + "description": "Filters to apply. `findingType = content` is applied automatically for CASB data.", + "items": { + "$ref": "#/$defs/art_Filter" + }, + "type": "array" + }, + "from": { + "description": "Start of the query time range (inclusive). RFC3339.", + "format": "date-time", + "type": "string" + }, + "n": { + "description": "Maximum number of integrations to return.", + "type": "integer" + }, + "to": { + "description": "End of the query time range (exclusive). RFC3339.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "filters", + "from", + "n", + "to" + ], + "type": "object" +}; diff --git a/src/generated/forge-mcp/analytics/query/dataSecurity/contentFindings/tools.ts b/src/generated/forge-mcp/analytics/query/dataSecurity/contentFindings/tools.ts new file mode 100644 index 00000000..01ed0ca0 --- /dev/null +++ b/src/generated/forge-mcp/analytics/query/dataSecurity/contentFindings/tools.ts @@ -0,0 +1,56 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; +import { art_Filter } from "../../schemas.js"; +import { art_DataSecurityContentFindingsTopNQuery } from "./schemas.js"; + +/** + * The tools of `analytics.query.data_security.content_findings`. + */ +export const tools: readonly Tool[] = [ + { + name: "analytics_query_data_security_content_findings_top_n", + title: "Top integrations by content findings", + description: "Returns the top N integrations ranked by total content findings.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account identifier.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/art_DataSecurityContentFindingsTopNQuery" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "art_DataSecurityContentFindingsTopNQuery": art_DataSecurityContentFindingsTopNQuery, + "art_Filter": art_Filter, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Top integrations by content findings" + }, + method: "POST", + path: "/accounts/{account_id}/analytics/query/data-security/content-findings/top-n", + extensions: { + "x-api-token-group": [ + "Zero Trust Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/analytics/query/data-security/content-findings/top-n`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/analytics/query/dataSecurity/findings/schemas.ts b/src/generated/forge-mcp/analytics/query/dataSecurity/findings/schemas.ts new file mode 100644 index 00000000..7bccf52c --- /dev/null +++ b/src/generated/forge-mcp/analytics/query/dataSecurity/findings/schemas.ts @@ -0,0 +1,68 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../../_/tool.js"; + +/** + * The schema of `art_DataSecurityFindingsSummaryQuery`. + */ +export const art_DataSecurityFindingsSummaryQuery: JsonSchema = { + "description": "Query for aggregate findings summary.", + "properties": { + "filters": { + "description": "Filters to apply.", + "items": { + "$ref": "#/$defs/art_Filter" + }, + "type": "array" + }, + "from": { + "description": "Start of the query time range (inclusive). RFC3339.", + "format": "date-time", + "type": "string" + }, + "to": { + "description": "End of the query time range (exclusive). RFC3339.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "filters", + "from", + "to" + ], + "type": "object" +}; + +/** + * The schema of `art_DataSecurityFindingsTimeseriesQuery`. + */ +export const art_DataSecurityFindingsTimeseriesQuery: JsonSchema = { + "description": "Query for findings timeseries.", + "properties": { + "filters": { + "description": "Filters to apply.", + "items": { + "$ref": "#/$defs/art_Filter" + }, + "type": "array" + }, + "from": { + "description": "Start of the query time range (inclusive). RFC3339.", + "format": "date-time", + "type": "string" + }, + "to": { + "description": "End of the query time range (exclusive). RFC3339.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "filters", + "from", + "to" + ], + "type": "object" +}; diff --git a/src/generated/forge-mcp/analytics/query/dataSecurity/findings/tools.ts b/src/generated/forge-mcp/analytics/query/dataSecurity/findings/tools.ts new file mode 100644 index 00000000..5b206e19 --- /dev/null +++ b/src/generated/forge-mcp/analytics/query/dataSecurity/findings/tools.ts @@ -0,0 +1,103 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; +import { art_Filter } from "../../schemas.js"; +import { + art_DataSecurityFindingsSummaryQuery, + art_DataSecurityFindingsTimeseriesQuery, +} from "./schemas.js"; + +/** + * The tools of `analytics.query.data_security.findings`. + */ +export const tools: readonly Tool[] = [ + { + name: "analytics_query_data_security_findings_summary", + title: "Data security findings summary", + description: "Returns aggregate current-period and previous-period totals for CASB findings.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account identifier.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/art_DataSecurityFindingsSummaryQuery" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "art_DataSecurityFindingsSummaryQuery": art_DataSecurityFindingsSummaryQuery, + "art_Filter": art_Filter, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Data security findings summary" + }, + method: "POST", + path: "/accounts/{account_id}/analytics/query/data-security/findings/summary", + extensions: { + "x-api-token-group": [ + "Zero Trust Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/analytics/query/data-security/findings/summary`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "analytics_query_data_security_findings_timeseries", + title: "Data security findings timeseries", + description: "Returns merged time-bucketed CASB findings.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account identifier.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/art_DataSecurityFindingsTimeseriesQuery" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "art_DataSecurityFindingsTimeseriesQuery": art_DataSecurityFindingsTimeseriesQuery, + "art_Filter": art_Filter, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Data security findings timeseries" + }, + method: "POST", + path: "/accounts/{account_id}/analytics/query/data-security/findings/timeseries", + extensions: { + "x-api-token-group": [ + "Zero Trust Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/analytics/query/data-security/findings/timeseries`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/analytics/query/schemas.ts b/src/generated/forge-mcp/analytics/query/schemas.ts new file mode 100644 index 00000000..231a10f0 --- /dev/null +++ b/src/generated/forge-mcp/analytics/query/schemas.ts @@ -0,0 +1,206 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `art_CommonQuery`. + */ +export const art_CommonQuery: JsonSchema = { + "description": "Defines fields that all query types share.", + "properties": { + "filters": { + "description": "Filters to apply before aggregating results.", + "items": { + "$ref": "#/$defs/art_Filter" + }, + "type": "array" + }, + "from": { + "description": "The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).", + "format": "date-time", + "type": "string" + }, + "groupBy": { + "description": "Specifies the column names to group results by. Requires valid columns for the target dataset.", + "items": { + "type": "string" + }, + "type": "array" + }, + "stats": { + "description": "Specifies the stat names to include in results. Requires valid stats for the target dataset (e.g. `attemptsTotal`, `bytesTotal`).", + "items": { + "type": "string" + }, + "type": "array" + }, + "to": { + "description": "Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "filters", + "from", + "groupBy", + "stats", + "to" + ], + "type": "object" +}; + +/** + * The schema of `art_Filter`. + */ +export const art_Filter: JsonSchema = { + "description": "A filter to apply to the query.", + "properties": { + "name": { + "description": "Specifies the column name to filter on. Requires a valid column for the target dataset (e.g. `country`, `allowed`, `appId`).", + "type": "string" + }, + "op": { + "description": "Filter operator. Common values: `eq`, `neq`, `in`, `not_in`, `gt`, `lt`, `gte`, `lte`.\n", + "type": "string" + }, + "values": { + "description": "Values to match against. Type depends on the column.", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "number" + } + ] + }, + "type": "array" + } + }, + "required": [ + "name", + "op", + "values" + ], + "type": "object" +}; + +/** + * The schema of `art_QueryTimeseries`. + */ +export const art_QueryTimeseries: JsonSchema = { + "description": "Defines fields that all query types share.", + "properties": { + "filters": { + "description": "Filters to apply before aggregating results.", + "items": { + "$ref": "#/$defs/art_Filter" + }, + "type": "array" + }, + "from": { + "description": "The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).", + "format": "date-time", + "type": "string" + }, + "groupBy": { + "description": "Specifies the column names to group results by. Requires valid columns for the target dataset.", + "items": { + "type": "string" + }, + "type": "array" + }, + "resolution": { + "description": "Time bucket size for grouping results. Controls the granularity of the returned time slots.\n", + "type": "string" + }, + "stats": { + "description": "Specifies the stat names to include in results. Requires valid stats for the target dataset (e.g. `attemptsTotal`, `bytesTotal`).", + "items": { + "type": "string" + }, + "type": "array" + }, + "to": { + "description": "Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "filters", + "from", + "groupBy", + "stats", + "to", + "resolution" + ], + "type": "object" +}; + +/** + * The schema of `art_QueryTopN`. + */ +export const art_QueryTopN: JsonSchema = { + "description": "Defines fields that all query types share.", + "properties": { + "filters": { + "description": "Filters to apply before aggregating results.", + "items": { + "$ref": "#/$defs/art_Filter" + }, + "type": "array" + }, + "from": { + "description": "The start of the query time range (inclusive). RFC3339 format with timezone is required (e.g. `2024-11-05T00:00:00Z`).", + "format": "date-time", + "type": "string" + }, + "groupBy": { + "description": "Specifies the column names to group results by. Requires valid columns for the target dataset.", + "items": { + "type": "string" + }, + "type": "array" + }, + "n": { + "description": "Maximum number of results to return.", + "type": "integer" + }, + "orderBy": { + "description": "Specifies the stat name for sorting results in descending order. Requires a valid stat for the target dataset.", + "type": "string" + }, + "stats": { + "description": "Specifies the stat names to include in results. Requires valid stats for the target dataset (e.g. `attemptsTotal`, `bytesTotal`).", + "items": { + "type": "string" + }, + "type": "array" + }, + "to": { + "description": "Specifies the end of the query time range (exclusive). Requires RFC3339 format with timezone.", + "format": "date-time", + "type": "string" + } + }, + "required": [ + "filters", + "from", + "groupBy", + "stats", + "to", + "n", + "orderBy" + ], + "type": "object" +}; diff --git a/src/generated/forge-mcp/analytics/query/tools.ts b/src/generated/forge-mcp/analytics/query/tools.ts new file mode 100644 index 00000000..a076b122 --- /dev/null +++ b/src/generated/forge-mcp/analytics/query/tools.ts @@ -0,0 +1,163 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { + art_CommonQuery, + art_Filter, + art_QueryTimeseries, + art_QueryTopN, +} from "./schemas.js"; + +/** + * The tools of `analytics.query`. + */ +export const tools: readonly Tool[] = [ + { + name: "analytics_query_summary", + title: "Query analytics summary", + description: "Returns aggregate summary stats for a dataset. Includes current-period and previous-period totals for trend comparison.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account identifier.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/art_CommonQuery" + }, + "dataset": { + "description": "Dataset name to query. Examples: `access-logins`, `gateway-http`, `gateway-dns`, `gateway-http`, `shadow-it`.\n", + "type": "string" + } + }, + required: [ + "account_id", + "dataset", + "body" + ], + $defs: { + "art_CommonQuery": art_CommonQuery, + "art_Filter": art_Filter, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Query analytics summary" + }, + method: "POST", + path: "/accounts/{account_id}/analytics/query/{dataset}/summary", + extensions: { + "x-api-token-group": [ + "Zero Trust Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/analytics/query/${pathParam(args, "dataset")}/summary`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "analytics_query_timeseries", + title: "Query analytics timeseries", + description: "Returns time-bucketed analytics data for a dataset. Includes time slots, each containing the requested stats, group-by dimensions, and resolution-controlled bucket size (e.g. `hour`, `day`).\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account identifier.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/art_QueryTimeseries" + }, + "dataset": { + "description": "Dataset name to query. Examples: `access-logins`, `gateway-http`, `gateway-dns`, `gateway-http`, `shadow-it`.\n", + "type": "string" + } + }, + required: [ + "account_id", + "dataset", + "body" + ], + $defs: { + "art_Filter": art_Filter, + "art_QueryTimeseries": art_QueryTimeseries, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Query analytics timeseries" + }, + method: "POST", + path: "/accounts/{account_id}/analytics/query/{dataset}/timeseries", + extensions: { + "x-api-token-group": [ + "Zero Trust Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/analytics/query/${pathParam(args, "dataset")}/timeseries`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "analytics_query_top_n", + title: "Query analytics top-N", + description: "Returns the top N results for a dataset by a specified stat. Includes an array of result rows, each containing the requested stats and group-by dimensions.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account identifier.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/art_QueryTopN" + }, + "dataset": { + "description": "Dataset name to query. Examples: `access-logins`, `gateway-http`, `gateway-dns`, `gateway-http`, `shadow-it`.\n", + "type": "string" + } + }, + required: [ + "account_id", + "dataset", + "body" + ], + $defs: { + "art_Filter": art_Filter, + "art_QueryTopN": art_QueryTopN, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Query analytics top-N" + }, + method: "POST", + path: "/accounts/{account_id}/analytics/query/{dataset}/top-n", + extensions: { + "x-api-token-group": [ + "Zero Trust Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/analytics/query/${pathParam(args, "dataset")}/top-n`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/analytics/sql/accounts/introspection/tools.ts b/src/generated/forge-mcp/analytics/sql/accounts/introspection/tools.ts new file mode 100644 index 00000000..0591a75a --- /dev/null +++ b/src/generated/forge-mcp/analytics/sql/accounts/introspection/tools.ts @@ -0,0 +1,84 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; + +/** + * The tools of `analytics.sql.accounts.introspection`. + */ +export const tools: readonly Tool[] = [ + { + name: "analytics_sql_accounts_introspection_get", + title: "List available analytics datasets", + description: "Returns the dataset catalogue for the account in the request path. API Gateway preserves the account path, and SQL API requires it to match the signed JWT account; account_tag is not required as a query parameter. If supplied, it must match the path account. Dataset and column discovery options are identical to the legacy introspection endpoint.\n\nThis method is alpha.", + inputSchema: { + type: "object", + properties: { + "account_tag": { + "description": "Account that authorizes and scopes the request.", + "type": "string" + }, + "dataset_name": { + "description": "Return only the dataset with this exact name. An empty value is treated as if the parameter had been omitted, and does not filter the catalogue. A name that matches no dataset in this deployment's catalogue is rejected with `422`; a dataset that exists but is not describable here is rejected identically, so the two cases cannot be told apart.\n\nA Workers Analytics Engine dataset is named in full, as `events.analyticsEngine.`; the namespace on its own returns every such dataset the account has. A `dataset_name` the account does not have is rejected with `422` like any other unknown name.\n", + "type": "string" + }, + "include_attributes": { + "default": false, + "description": "Include a capped set of attribute names and types observed during the preceding seven days, as `attributes`. Requires a nonempty dataset_name. Replaces `include_custom_attributes`, which is deprecated.\n", + "type": "boolean" + }, + "include_columns": { + "default": false, + "description": "Include column metadata for each returned dataset.", + "type": "boolean" + }, + "include_custom_attributes": { + "default": false, + "description": "Include a capped set of custom attribute names and types observed during the preceding seven days, as `custom_attributes`. Requires a nonempty dataset_name. Deprecated in favor of `include_attributes`.\n", + "type": "boolean" + }, + "include_lex": { + "default": true, + "description": "Include Log Explorer datasets, which are listed only where the account has them. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup.\n", + "type": "boolean" + }, + "include_wae": { + "default": true, + "description": "Include Workers Analytics Engine datasets, which are discovered from the account's own data. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup.\n", + "type": "boolean" + } + }, + required: [ + "account_tag" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List available analytics datasets" + }, + method: "GET", + path: "/accounts/{account_tag}/analytics/sql/introspection", + extensions: { + "x-api-token-group": [ + "Account Analytics Read" + ], + "x-fern-audiences": [ + "sdk" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_tag")}/analytics/sql/introspection`, + query: [ + ["include_columns", args["include_columns"], true], + ["include_custom_attributes", args["include_custom_attributes"], true], + ["include_attributes", args["include_attributes"], true], + ["include_wae", args["include_wae"], true], + ["include_lex", args["include_lex"], true], + ["dataset_name", args["dataset_name"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/analytics/sql/accounts/tools.ts b/src/generated/forge-mcp/analytics/sql/accounts/tools.ts new file mode 100644 index 00000000..2ecb84a9 --- /dev/null +++ b/src/generated/forge-mcp/analytics/sql/accounts/tools.ts @@ -0,0 +1,113 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { + analytics_sql_SqlQueryAccountScope, + analytics_sql_SqlQueryRequest, + analytics_sql_SqlQueryRequest_params, + analytics_sql_SqlQueryScope, + analytics_sql_SqlQueryTimeRange, + analytics_sql_SqlQueryZoneScope, +} from "../../../schemas.js"; + +/** + * The tools of `analytics.sql.accounts`. + */ +export const tools: readonly Tool[] = [ + { + name: "analytics_sql_accounts_get", + title: "Query analytics datasets", + description: "Executes a SQL query scoped to the account in the request path. API Gateway preserves the account path, and SQL API requires it to match the signed JWT account, so an accountTag predicate or JSON scope is not required. Explicit account scope must match the path account. Any zone restrictions must belong to that account. Query parameters, time ranges, output formats, authorization, and responses follow the legacy query endpoint.\n\nThis method is alpha.", + inputSchema: { + type: "object", + properties: { + "account_tag": { + "description": "Account that authorizes and scopes the request.", + "type": "string" + }, + "query": { + "description": "SQL query to execute. A trailing FORMAT selects JSON, JSONEachRow, TabSeparated, or TSV output on any dataset.\n", + "type": "string" + } + }, + required: [ + "account_tag", + "query" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Query analytics datasets" + }, + method: "GET", + path: "/accounts/{account_tag}/analytics/sql", + extensions: { + "x-api-token-group": [ + "Account Analytics Read" + ], + "x-fern-audiences": [ + "sdk" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_tag")}/analytics/sql`, + query: [ + ["query", args["query"], true], + ], + }), + }, + { + name: "analytics_sql_accounts_post", + title: "Query analytics datasets", + description: "Executes a SQL query scoped to the account in the request path. API Gateway preserves the account path, and SQL API requires it to match the signed JWT account, so an accountTag predicate or JSON scope is not required. Explicit account scope must match the path account. Any zone restrictions must belong to that account. Query parameters, time ranges, output formats, authorization, and responses follow the legacy query endpoint.\n\nThis method is alpha.", + inputSchema: { + type: "object", + properties: { + "account_tag": { + "description": "Account that authorizes and scopes the request.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/analytics-sql_SqlQueryRequest" + } + }, + required: [ + "account_tag", + "body" + ], + $defs: { + "analytics-sql_SqlQueryAccountScope": analytics_sql_SqlQueryAccountScope, + "analytics-sql_SqlQueryRequest": analytics_sql_SqlQueryRequest, + "analytics-sql_SqlQueryRequest_params": analytics_sql_SqlQueryRequest_params, + "analytics-sql_SqlQueryScope": analytics_sql_SqlQueryScope, + "analytics-sql_SqlQueryTimeRange": analytics_sql_SqlQueryTimeRange, + "analytics-sql_SqlQueryZoneScope": analytics_sql_SqlQueryZoneScope, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Query analytics datasets" + }, + method: "POST", + path: "/accounts/{account_tag}/analytics/sql", + extensions: { + "x-api-token-group": [ + "Account Analytics Read" + ], + "x-fern-audiences": [ + "sdk" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_tag")}/analytics/sql`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/analytics/sql/tools.ts b/src/generated/forge-mcp/analytics/sql/tools.ts new file mode 100644 index 00000000..3cf02260 --- /dev/null +++ b/src/generated/forge-mcp/analytics/sql/tools.ts @@ -0,0 +1,50 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { Tool } from "../../_/tool.js"; + +/** + * The tools of `analytics.sql`. + */ +export const tools: readonly Tool[] = [ + { + name: "analytics_sql_get", + title: "Query analytics datasets", + description: "Executes a SQL query against the analytics datasets available to the caller. SQL placeholders can be bound with query parameters named `param_`, such as `param_status=404` for `$status`. A trailing `FORMAT JSON`, `FORMAT JSONEachRow`, `FORMAT TabSeparated`, or `FORMAT TSV` is supported for all datasets. Without FORMAT, each backend retains its existing default JSON response.", + inputSchema: { + type: "object", + properties: { + "query": { + "description": "SQL query to execute. A trailing FORMAT selects JSON, JSONEachRow, TabSeparated, or TSV output on any dataset.\n", + "type": "string" + } + }, + required: [ + "query" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Query analytics datasets" + }, + method: "GET", + path: "/analytics/sql", + extensions: { + "x-api-token-group": [ + "Account Analytics Read" + ], + "x-fern-audiences": [ + "sdk" + ] + }, + request: (args) => ({ + path: `/analytics/sql`, + query: [ + ["query", args["query"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/apiSecurity/schemaValidation/schemas/hosts/tools.ts b/src/generated/forge-mcp/apiSecurity/schemaValidation/schemas/hosts/tools.ts new file mode 100644 index 00000000..36e93ed9 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/schemaValidation/schemas/hosts/tools.ts @@ -0,0 +1,68 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; +import { + api_shield_identifier, + api_shield_identifier_2, +} from "../../../../schemas.js"; + +/** + * The tools of `api_security.schema_validation.schemas.hosts`. + */ +export const tools: readonly Tool[] = [ + { + name: "api_security_schema_validation_schemas_hosts_list", + title: "List hosts covered by uploaded schemas", + description: "Lists all unique hosts found in uploaded OpenAPI schemas for the zone.", + inputSchema: { + type: "object", + properties: { + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Maximum number of results per page.", + "type": "integer" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List hosts covered by uploaded schemas" + }, + method: "GET", + path: "/zones/{zone_id}/schema_validation/schemas/hosts", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Account API Gateway Read", + "Domain API Gateway", + "Domain API Gateway Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/schemas/hosts`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/apiSecurity/schemaValidation/schemas/operations/tools.ts b/src/generated/forge-mcp/apiSecurity/schemaValidation/schemas/operations/tools.ts new file mode 100644 index 00000000..eb114737 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/schemaValidation/schemas/operations/tools.ts @@ -0,0 +1,129 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; +import { + api_shield_identifier, + api_shield_identifier_2, + api_shield_uuid, + api_shield_uuid_2, +} from "../../../../schemas.js"; + +/** + * The tools of `api_security.schema_validation.schemas.operations`. + */ +export const tools: readonly Tool[] = [ + { + name: "api_security_schema_validation_schemas_operations_list", + title: "Retrieve all operations from the schema", + description: "Retrieves all operations from the schema. Operations that already exist in API Shield Endpoint Management will be returned as full operations.", + inputSchema: { + type: "object", + properties: { + "endpoint": { + "description": "Filter results to only include endpoints containing this pattern.", + "type": "string" + }, + "feature": { + "description": "Add feature(s) to the results. The feature name that is given here corresponds to the resulting feature object. Have a look at the top-level object description for more details on the specific meaning.", + "items": { + "enum": [ + "thresholds", + "parameter_schemas", + "schema_info", + "confidence_intervals" + ], + "type": "string" + }, + "type": "array" + }, + "host": { + "description": "Filter results to only include the specified hosts.", + "items": { + "type": "string" + }, + "type": "array" + }, + "method": { + "description": "Filter results to only include the specified HTTP methods.", + "items": { + "type": "string" + }, + "type": "array" + }, + "operation_status": { + "description": "Filter results by whether operations exist in Web Asset Management or not. `new` will just return operations from the schema that do not exist otherwise. `existing` will just return operations from the schema that already exist.", + "enum": [ + "new", + "existing" + ], + "type": "string" + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Maximum number of results per page.", + "type": "integer" + }, + "schema_id": { + "allOf": [ + { + "$ref": "#/$defs/api-shield_uuid-2" + }, + { + "format": "uuid", + "type": "string" + } + ], + "description": "The unique identifier of the schema" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "schema_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Retrieve all operations from the schema" + }, + method: "GET", + path: "/zones/{zone_id}/schema_validation/schemas/{schema_id}/operations", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Account API Gateway Read", + "Domain API Gateway", + "Domain API Gateway Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/schemas/${pathParam(args, "schema_id")}/operations`, + query: [ + ["feature", args["feature"], true], + ["host", args["host"], true], + ["method", args["method"], true], + ["endpoint", args["endpoint"], true], + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["operation_status", args["operation_status"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/apiSecurity/schemaValidation/schemas/tools.ts b/src/generated/forge-mcp/apiSecurity/schemaValidation/schemas/tools.ts new file mode 100644 index 00000000..d7740811 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/schemaValidation/schemas/tools.ts @@ -0,0 +1,331 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { + api_shield_identifier, + api_shield_identifier_2, + api_shield_uuid, + api_shield_uuid_2, +} from "../../../schemas.js"; + +/** + * The tools of `api_security.schema_validation.schemas`. + */ +export const tools: readonly Tool[] = [ + { + name: "api_security_schema_validation_schemas_create", + title: "Upload a schema", + description: "Uploads an OpenAPI schema that defines expected request formats for API operations.", + inputSchema: { + type: "object", + properties: { + "body": { + "properties": { + "kind": { + "description": "The kind of the schema", + "enum": [ + "openapi_v3" + ], + "type": "string" + }, + "name": { + "description": "A human-readable name for the schema", + "type": "string" + }, + "source": { + "description": "The raw schema, e.g., the OpenAPI schema, either as JSON or YAML", + "type": "string" + }, + "validation_enabled": { + "description": "An indicator if this schema is enabled", + "type": "boolean" + } + }, + "required": [ + "kind", + "name", + "source", + "validation_enabled" + ], + "type": "object" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Upload a schema" + }, + method: "POST", + path: "/zones/{zone_id}/schema_validation/schemas", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/schemas`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_schema_validation_schemas_delete", + title: "Delete a schema", + description: "Permanently removes an uploaded OpenAPI schema from API Security. Operations using this schema will lose their validation rules.\n\nConfirm with the user before calling this tool. This operation permanently deletes the uploaded schema and removes its validation coverage.", + inputSchema: { + type: "object", + properties: { + "schema_id": { + "allOf": [ + { + "$ref": "#/$defs/api-shield_uuid-2" + }, + { + "format": "uuid", + "type": "string" + } + ], + "description": "The unique identifier of the schema" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "schema_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a schema" + }, + method: "DELETE", + path: "/zones/{zone_id}/schema_validation/schemas/{schema_id}", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/schemas/${pathParam(args, "schema_id")}`, + }), + }, + { + name: "api_security_schema_validation_schemas_get", + title: "Get details of a schema", + description: "Gets the contents and metadata of a specific OpenAPI schema uploaded to API Security.", + inputSchema: { + type: "object", + properties: { + "omit_source": { + "default": false, + "description": "Omit the source-files of schemas and only retrieve their meta-data.", + "type": "boolean" + }, + "schema_id": { + "allOf": [ + { + "$ref": "#/$defs/api-shield_uuid-2" + }, + { + "format": "uuid", + "type": "string" + } + ], + "description": "The unique identifier of the schema" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "schema_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get details of a schema" + }, + method: "GET", + path: "/zones/{zone_id}/schema_validation/schemas/{schema_id}", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Account API Gateway Read", + "Domain API Gateway", + "Domain API Gateway Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/schemas/${pathParam(args, "schema_id")}`, + query: [ + ["omit_source", args["omit_source"], true], + ], + }), + }, + { + name: "api_security_schema_validation_schemas_list", + title: "List all uploaded schemas", + description: "Lists all OpenAPI schemas uploaded to API Security.", + inputSchema: { + type: "object", + properties: { + "omit_source": { + "default": false, + "description": "Omit the source-files of schemas and only retrieve their meta-data.", + "type": "boolean" + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Maximum number of results per page.", + "type": "integer" + }, + "validation_enabled": { + "description": "Filter for enabled schemas", + "type": "boolean" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List all uploaded schemas" + }, + method: "GET", + path: "/zones/{zone_id}/schema_validation/schemas", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Account API Gateway Read", + "Domain API Gateway", + "Domain API Gateway Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/schemas`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ["omit_source", args["omit_source"], true], + ["validation_enabled", args["validation_enabled"], true], + ], + }), + }, + { + name: "api_security_schema_validation_schemas_set_validation", + title: "Set schema validation state", + description: "Enables or disables validation for an uploaded OpenAPI schema without changing the schema document.", + inputSchema: { + type: "object", + properties: { + "body": { + "properties": { + "validation_enabled": { + "description": "Flag whether schema is enabled for validation.", + "type": "boolean" + } + }, + "type": "object" + }, + "schema_id": { + "allOf": [ + { + "$ref": "#/$defs/api-shield_uuid-2" + }, + { + "format": "uuid", + "type": "string" + } + ], + "description": "The unique identifier of the schema" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "schema_id", + "body" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Set schema validation state" + }, + method: "PATCH", + path: "/zones/{zone_id}/schema_validation/schemas/{schema_id}", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/schemas/${pathParam(args, "schema_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/apiSecurity/schemaValidation/settings/operations/schemas.ts b/src/generated/forge-mcp/apiSecurity/schemaValidation/settings/operations/schemas.ts new file mode 100644 index 00000000..5504f814 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/schemaValidation/settings/operations/schemas.ts @@ -0,0 +1,30 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../../_/tool.js"; + +/** + * The schema of `api-shield_per_operation_settings_bulk_edit_value`. + */ +export const api_shield_per_operation_settings_bulk_edit_value: JsonSchema = { + "description": "Operation ID to mitigation action mappings", + "properties": { + "mitigation_action": { + "description": "Mitigation actions are as follows:\n* `log` - log request when request does not conform to schema * `block` - deny access to the site when request does not conform to schema * `none` - skip running schema validation * null - clears any existing per-operation setting\n", + "oneOf": [ + { + "enum": [ + "none", + "log", + "block" + ], + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" +}; diff --git a/src/generated/forge-mcp/apiSecurity/schemaValidation/settings/operations/tools.ts b/src/generated/forge-mcp/apiSecurity/schemaValidation/settings/operations/tools.ts new file mode 100644 index 00000000..46cf0d80 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/schemaValidation/settings/operations/tools.ts @@ -0,0 +1,277 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; +import { + api_shield_identifier, + api_shield_identifier_2, + api_shield_uuid, +} from "../../../../schemas.js"; +import { api_shield_per_operation_settings_bulk_edit_value } from "./schemas.js"; + +/** + * The tools of `api_security.schema_validation.settings.operations`. + */ +export const tools: readonly Tool[] = [ + { + name: "api_security_schema_validation_settings_operations_bulk_edit", + title: "Bulk edit per-operation schema validation settings", + description: "Updates schema validation settings for multiple API operations in a single request. Efficient for applying consistent validation rules across endpoints.", + inputSchema: { + type: "object", + properties: { + "body": { + "additionalProperties": { + "$ref": "#/$defs/api-shield_per_operation_settings_bulk_edit_value" + }, + "type": "object" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_per_operation_settings_bulk_edit_value": api_shield_per_operation_settings_bulk_edit_value, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Bulk edit per-operation schema validation settings" + }, + method: "PATCH", + path: "/zones/{zone_id}/schema_validation/settings/operations", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/settings/operations`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_schema_validation_settings_operations_delete", + title: "Delete per-operation schema validation setting", + description: "Removes custom schema validation settings for a specific API operation, reverting to zone-level defaults.\n\nConfirm with the user before calling this tool. This operation deletes the operation-specific schema validation setting and restores the zone default.", + inputSchema: { + type: "object", + properties: { + "operation_id": { + "$ref": "#/$defs/api-shield_uuid", + "description": "Identifier for the operation" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "operation_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete per-operation schema validation setting" + }, + method: "DELETE", + path: "/zones/{zone_id}/schema_validation/settings/operations/{operation_id}", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/settings/operations/${pathParam(args, "operation_id")}`, + }), + }, + { + name: "api_security_schema_validation_settings_operations_get", + title: "Get per-operation schema validation setting", + description: "Retrieves the schema validation settings configured for a specific API operation.", + inputSchema: { + type: "object", + properties: { + "operation_id": { + "$ref": "#/$defs/api-shield_uuid", + "description": "Identifier for the operation" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "operation_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get per-operation schema validation setting" + }, + method: "GET", + path: "/zones/{zone_id}/schema_validation/settings/operations/{operation_id}", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Account API Gateway Read", + "Domain API Gateway", + "Domain API Gateway Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/settings/operations/${pathParam(args, "operation_id")}`, + }), + }, + { + name: "api_security_schema_validation_settings_operations_list", + title: "List per-operation schema validation settings", + description: "Lists per-operation schema validation settings configured for the zone.", + inputSchema: { + type: "object", + properties: { + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Maximum number of results per page.", + "type": "integer" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List per-operation schema validation settings" + }, + method: "GET", + path: "/zones/{zone_id}/schema_validation/settings/operations", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Account API Gateway Read", + "Domain API Gateway", + "Domain API Gateway Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/settings/operations`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, + { + name: "api_security_schema_validation_settings_operations_update", + title: "Update per-operation schema validation setting", + description: "Fully updates schema validation settings for a specific API operation.", + inputSchema: { + type: "object", + properties: { + "body": { + "properties": { + "mitigation_action": { + "description": "When set, this applies a mitigation action to this operation\n\n - `\"log\"` - log request when request does not conform to schema for this operation\n - `\"block\"` - deny access to the site when request does not conform to schema for this operation\n - `\"none\"` - will skip mitigation for this operation\n - `null` - clears any mitigation action\n", + "oneOf": [ + { + "enum": [ + "log", + "block", + "none" + ], + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "mitigation_action" + ], + "type": "object" + }, + "operation_id": { + "$ref": "#/$defs/api-shield_uuid", + "description": "Identifier for the operation" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "operation_id", + "body" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update per-operation schema validation setting" + }, + method: "PUT", + path: "/zones/{zone_id}/schema_validation/settings/operations/{operation_id}", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/settings/operations/${pathParam(args, "operation_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/apiSecurity/schemaValidation/settings/schemas.ts b/src/generated/forge-mcp/apiSecurity/schemaValidation/settings/schemas.ts new file mode 100644 index 00000000..094ae5a0 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/schemaValidation/settings/schemas.ts @@ -0,0 +1,36 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../_/tool.js"; + +/** + * The schema of `api-shield_global_setting_change_base`. + */ +export const api_shield_global_setting_change_base: JsonSchema = { + "properties": { + "validation_default_mitigation_action": { + "description": "The default mitigation action used\nMitigation actions are as follows:\n\n - `\"log\"` - log request when request does not conform to schema\n - `\"block\"` - deny access to the site when request does not conform to schema\n - `\"none\"` - skip running schema validation\n", + "enum": [ + "none", + "log", + "block" + ], + "type": "string" + }, + "validation_override_mitigation_action": { + "description": "When set, this overrides both zone level and operation level mitigation actions.\n\n - `\"none\"` - skip running schema validation entirely for the request\n - `null` - clears any existing override\n", + "oneOf": [ + { + "enum": [ + "none" + ], + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" +}; diff --git a/src/generated/forge-mcp/apiSecurity/schemaValidation/settings/tools.ts b/src/generated/forge-mcp/apiSecurity/schemaValidation/settings/tools.ts new file mode 100644 index 00000000..5b083df5 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/schemaValidation/settings/tools.ts @@ -0,0 +1,170 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { + api_shield_identifier, + api_shield_identifier_2, +} from "../../../schemas.js"; +import { api_shield_global_setting_change_base } from "./schemas.js"; + +/** + * The tools of `api_security.schema_validation.settings`. + */ +export const tools: readonly Tool[] = [ + { + name: "api_security_schema_validation_settings_edit", + title: "Edit global schema validation settings", + description: "Partially updates global schema validation settings for a zone using PATCH semantics.", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/api-shield_global_setting_change_base" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "api-shield_global_setting_change_base": api_shield_global_setting_change_base, + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Edit global schema validation settings" + }, + method: "PATCH", + path: "/zones/{zone_id}/schema_validation/settings", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/settings`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_schema_validation_settings_get", + title: "Get global schema validation settings", + description: "Retrieves the current global schema validation settings for a zone.", + inputSchema: { + type: "object", + properties: { + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get global schema validation settings" + }, + method: "GET", + path: "/zones/{zone_id}/schema_validation/settings", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Account API Gateway Read", + "Domain API Gateway", + "Domain API Gateway Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/settings`, + }), + }, + { + name: "api_security_schema_validation_settings_update", + title: "Update global schema validation settings", + description: "Fully updates global schema validation settings for a zone, replacing existing configuration.", + inputSchema: { + type: "object", + properties: { + "body": { + "properties": { + "validation_default_mitigation_action": { + "description": "The default mitigation action used\nMitigation actions are as follows:\n\n - `\"log\"` - log request when request does not conform to schema\n - `\"block\"` - deny access to the site when request does not conform to schema\n - `\"none\"` - skip running schema validation\n", + "enum": [ + "none", + "log", + "block" + ], + "type": "string" + }, + "validation_override_mitigation_action": { + "description": "When set, this overrides both zone level and operation level mitigation actions.\n\n - `\"none\"` - skip running schema validation entirely for the request\n - `null` - clears any existing override\n", + "oneOf": [ + { + "enum": [ + "none" + ], + "type": "string" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "validation_default_mitigation_action" + ], + "type": "object" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update global schema validation settings" + }, + method: "PUT", + path: "/zones/{zone_id}/schema_validation/settings", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/schema_validation/settings`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/apiSecurity/sessionIdentifiers/schemas.ts b/src/generated/forge-mcp/apiSecurity/sessionIdentifiers/schemas.ts new file mode 100644 index 00000000..c9aceda3 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/sessionIdentifiers/schemas.ts @@ -0,0 +1,88 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `api-shield_auth_id_characteristic`. + */ +export const api_shield_auth_id_characteristic: JsonSchema = { + "description": "Auth ID Characteristic", + "properties": { + "name": { + "description": "The name of the characteristic field, i.e., the header or cookie name.", + "type": "string" + }, + "type": { + "description": "The type of characteristic.", + "enum": [ + "header", + "cookie" + ], + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "type": "object" +}; + +/** + * The schema of `api-shield_auth_id_characteristic_jwt_claim`. + */ +export const api_shield_auth_id_characteristic_jwt_claim: JsonSchema = { + "description": "Auth ID Characteristic extracted from JWT Token Claims", + "properties": { + "name": { + "description": "Claim location expressed as `$(token_config_id):$(json_path)`, where `token_config_id` \nis the ID of the token configuration used in validating the JWT, and `json_path` is a RFC 9535 \nJSONPath (https://goessner.net/articles/JsonPath/, https://www.rfc-editor.org/rfc/rfc9535.html).\nThe JSONPath expression may be in dot or bracket notation, may only specify literal keys\nor array indexes, and must return a singleton value, which will be interpreted as a string.\n", + "type": "string" + }, + "type": { + "description": "The type of characteristic.", + "enum": [ + "jwt" + ], + "type": "string" + } + }, + "required": [ + "name", + "type" + ], + "type": "object" +}; + +/** + * The schema of `api-shield_auth_id_characteristics`. + */ +export const api_shield_auth_id_characteristics: JsonSchema = { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/api-shield_auth_id_characteristic" + }, + { + "$ref": "#/$defs/api-shield_auth_id_characteristic_jwt_claim" + } + ] + }, + "maxItems": 10, + "type": "array" +}; + +/** + * The schema of `api-shield_configuration`. + */ +export const api_shield_configuration: JsonSchema = { + "properties": { + "auth_id_characteristics": { + "$ref": "#/$defs/api-shield_auth_id_characteristics" + } + }, + "required": [ + "auth_id_characteristics" + ], + "type": "object" +}; diff --git a/src/generated/forge-mcp/apiSecurity/sessionIdentifiers/tools.ts b/src/generated/forge-mcp/apiSecurity/sessionIdentifiers/tools.ts new file mode 100644 index 00000000..1e638718 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/sessionIdentifiers/tools.ts @@ -0,0 +1,121 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { + api_shield_identifier, + api_shield_identifier_2, +} from "../../schemas.js"; +import { + api_shield_auth_id_characteristic, + api_shield_auth_id_characteristic_jwt_claim, + api_shield_auth_id_characteristics, + api_shield_configuration, +} from "./schemas.js"; + +/** + * The tools of `api_security.session_identifiers`. + */ +export const tools: readonly Tool[] = [ + { + name: "api_security_session_identifiers_get", + title: "Get session identifier settings", + description: "Returns the authentication identifier characteristics configured for the zone. Header, cookie, or JWT claim values identify distinct API sessions.", + inputSchema: { + type: "object", + properties: { + "normalize": { + "description": "Ensures that the configuration is written or retrieved in normalized fashion", + "type": "boolean" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get session identifier settings" + }, + method: "GET", + path: "/zones/{zone_id}/api_gateway/configuration", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Account API Gateway Read", + "Domain API Gateway", + "Domain API Gateway Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/api_gateway/configuration`, + query: [ + ["normalize", args["normalize"], true], + ], + }), + }, + { + name: "api_security_session_identifiers_update", + title: "Update session identifier settings", + description: "Replaces the zone's authentication identifier characteristics used to identify distinct API sessions.", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/api-shield_configuration" + }, + "normalize": { + "description": "Ensures that the configuration is written or retrieved in normalized fashion", + "type": "boolean" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "api-shield_auth_id_characteristic": api_shield_auth_id_characteristic, + "api-shield_auth_id_characteristic_jwt_claim": api_shield_auth_id_characteristic_jwt_claim, + "api-shield_auth_id_characteristics": api_shield_auth_id_characteristics, + "api-shield_configuration": api_shield_configuration, + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update session identifier settings" + }, + method: "PUT", + path: "/zones/{zone_id}/api_gateway/configuration", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/api_gateway/configuration`, + query: [ + ["normalize", args["normalize"], true], + ], + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/apiSecurity/tokenValidation/configurations/credentials/schemas.ts b/src/generated/forge-mcp/apiSecurity/tokenValidation/configurations/credentials/schemas.ts new file mode 100644 index 00000000..9e9d4232 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/tokenValidation/configurations/credentials/schemas.ts @@ -0,0 +1,85 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../../_/tool.js"; + +/** + * The schema of `api-shield_credentials-JWT-Key-oct-patch-request`. + */ +export const api_shield_credentials_JWT_Key_oct_patch_request: JsonSchema = { + "description": "JSON representation of a symmetric key for PATCH requests.", + "properties": { + "alg": { + "description": "Algorithm", + "enum": [ + "HS256", + "HS384", + "HS512" + ], + "type": "string" + }, + "k": { + "description": "Symmetric key material. Optional for PATCH: omit to preserve existing secret for matching `{alg,kid}`; send a string to rotate. `k: null` is invalid.", + "type": "string" + }, + "kid": { + "description": "Key ID", + "type": "string" + }, + "kty": { + "description": "Key Type", + "enum": [ + "oct" + ], + "type": "string" + } + }, + "required": [ + "kid", + "alg", + "kty" + ], + "type": "object" +}; + +/** + * The schema of `api-shield_credentials-JWT-Key-patch-request`. + */ +export const api_shield_credentials_JWT_Key_patch_request: JsonSchema = { + "description": "JSON representation of a JWKS key for PATCH credentials requests.", + "oneOf": [ + { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-RSA" + }, + { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-EC-ES256" + }, + { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-EC-ES384" + }, + { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-oct-patch-request" + } + ] +}; + +/** + * The schema of `api-shield_credentials-patch-request`. + */ +export const api_shield_credentials_patch_request: JsonSchema = { + "description": "Request payload for PATCH credentials. Provided keys define the complete stored key set, and stored keys omitted from payload are removed. For each provided key identity (`{alg,kid}`), payload fields overwrite the stored key before validation and omitted fields inherit from the stored key. Key identities must be unique.", + "properties": { + "keys": { + "items": { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-patch-request" + }, + "maxItems": 64, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "keys" + ], + "type": "object" +}; diff --git a/src/generated/forge-mcp/apiSecurity/tokenValidation/configurations/credentials/tools.ts b/src/generated/forge-mcp/apiSecurity/tokenValidation/configurations/credentials/tools.ts new file mode 100644 index 00000000..e5f9a1b3 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/tokenValidation/configurations/credentials/tools.ts @@ -0,0 +1,147 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; +import { + api_shield_identifier, + api_shield_identifier_2, + api_shield_uuid, + api_shield_uuid_2, +} from "../../../../schemas.js"; +import { + api_shield_credentials_JWT_Key_EC_ES256, + api_shield_credentials_JWT_Key_EC_ES384, + api_shield_credentials_JWT_Key_EC_common, + api_shield_credentials_JWT_Key_RSA, + api_shield_credentials_JWT_Key_common, + api_shield_credentials_JWT_Key_oct_request, + api_shield_credentials_JWT_Key_request, + api_shield_credentials_request, +} from "../schemas.js"; +import { + api_shield_credentials_JWT_Key_oct_patch_request, + api_shield_credentials_JWT_Key_patch_request, + api_shield_credentials_patch_request, +} from "./schemas.js"; + +/** + * The tools of `api_security.token_validation.configurations.credentials`. + */ +export const tools: readonly Tool[] = [ + { + name: "api_security_token_validation_configurations_credentials_edit", + title: "Edit token validation credentials", + description: "Updates the configuration's complete key set while allowing omitted fields on existing keys to retain stored values. Omitted key identities are removed.", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/api-shield_credentials-patch-request" + }, + "config_id": { + "$ref": "#/$defs/api-shield_uuid-2", + "description": "Token Configuration ID" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "config_id", + "body" + ], + $defs: { + "api-shield_credentials-JWT-Key-EC-ES256": api_shield_credentials_JWT_Key_EC_ES256, + "api-shield_credentials-JWT-Key-EC-ES384": api_shield_credentials_JWT_Key_EC_ES384, + "api-shield_credentials-JWT-Key-EC-common": api_shield_credentials_JWT_Key_EC_common, + "api-shield_credentials-JWT-Key-RSA": api_shield_credentials_JWT_Key_RSA, + "api-shield_credentials-JWT-Key-common": api_shield_credentials_JWT_Key_common, + "api-shield_credentials-JWT-Key-oct-patch-request": api_shield_credentials_JWT_Key_oct_patch_request, + "api-shield_credentials-JWT-Key-patch-request": api_shield_credentials_JWT_Key_patch_request, + "api-shield_credentials-patch-request": api_shield_credentials_patch_request, + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Edit token validation credentials" + }, + method: "PATCH", + path: "/zones/{zone_id}/token_validation/config/{config_id}/credentials", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/config/${pathParam(args, "config_id")}/credentials`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_token_validation_configurations_credentials_update", + title: "Replace token validation credentials", + description: "Replaces the configuration's complete key set. Symmetric keys must include their key material.", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/api-shield_credentials-request" + }, + "config_id": { + "$ref": "#/$defs/api-shield_uuid-2", + "description": "Token Configuration ID" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "config_id", + "body" + ], + $defs: { + "api-shield_credentials-JWT-Key-EC-ES256": api_shield_credentials_JWT_Key_EC_ES256, + "api-shield_credentials-JWT-Key-EC-ES384": api_shield_credentials_JWT_Key_EC_ES384, + "api-shield_credentials-JWT-Key-EC-common": api_shield_credentials_JWT_Key_EC_common, + "api-shield_credentials-JWT-Key-RSA": api_shield_credentials_JWT_Key_RSA, + "api-shield_credentials-JWT-Key-common": api_shield_credentials_JWT_Key_common, + "api-shield_credentials-JWT-Key-oct-request": api_shield_credentials_JWT_Key_oct_request, + "api-shield_credentials-JWT-Key-request": api_shield_credentials_JWT_Key_request, + "api-shield_credentials-request": api_shield_credentials_request, + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Replace token validation credentials" + }, + method: "PUT", + path: "/zones/{zone_id}/token_validation/config/{config_id}/credentials", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/config/${pathParam(args, "config_id")}/credentials`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/apiSecurity/tokenValidation/configurations/schemas.ts b/src/generated/forge-mcp/apiSecurity/tokenValidation/configurations/schemas.ts new file mode 100644 index 00000000..73cd7a0f --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/tokenValidation/configurations/schemas.ts @@ -0,0 +1,314 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../_/tool.js"; + +/** + * The schema of `api-shield_cookie`. + */ +export const api_shield_cookie: JsonSchema = { + "description": "HTTP request cookie", + "type": "string" +}; + +/** + * The schema of `api-shield_credentials-JWT-Key-EC-ES256`. + */ +export const api_shield_credentials_JWT_Key_EC_ES256: JsonSchema = { + "allOf": [ + { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-common" + }, + { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-EC-common" + }, + { + "properties": { + "alg": { + "description": "Algorithm", + "enum": [ + "ES256" + ], + "type": "string" + }, + "crv": { + "description": "Curve", + "enum": [ + "P-256" + ], + "type": "string" + } + }, + "required": [ + "alg", + "crv" + ], + "type": "object" + } + ], + "description": "JSON representation of an ES256 key" +}; + +/** + * The schema of `api-shield_credentials-JWT-Key-EC-ES384`. + */ +export const api_shield_credentials_JWT_Key_EC_ES384: JsonSchema = { + "allOf": [ + { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-common" + }, + { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-EC-common" + }, + { + "properties": { + "alg": { + "description": "Algorithm", + "enum": [ + "ES384" + ], + "type": "string" + }, + "crv": { + "description": "Curve", + "enum": [ + "P-384" + ], + "type": "string" + } + }, + "required": [ + "alg", + "crv" + ], + "type": "object" + } + ], + "description": "JSON representation of an ES384 key" +}; + +/** + * The schema of `api-shield_credentials-JWT-Key-EC-common`. + */ +export const api_shield_credentials_JWT_Key_EC_common: JsonSchema = { + "properties": { + "kty": { + "description": "Key Type", + "enum": [ + "EC" + ], + "type": "string" + }, + "x": { + "description": "X EC coordinate", + "type": "string" + }, + "y": { + "description": "Y EC coordinate", + "type": "string" + } + }, + "required": [ + "kty", + "x", + "y" + ], + "type": "object" +}; + +/** + * The schema of `api-shield_credentials-JWT-Key-RSA`. + */ +export const api_shield_credentials_JWT_Key_RSA: JsonSchema = { + "description": "JSON representation of an RSA key.", + "properties": { + "alg": { + "description": "Algorithm", + "enum": [ + "RS256", + "RS384", + "RS512", + "PS256", + "PS384", + "PS512" + ], + "type": "string" + }, + "e": { + "description": "RSA exponent", + "type": "string" + }, + "kid": { + "description": "Key ID", + "type": "string" + }, + "kty": { + "description": "Key Type", + "enum": [ + "RSA" + ], + "type": "string" + }, + "n": { + "description": "RSA modulus", + "type": "string" + } + }, + "required": [ + "kid", + "alg", + "e", + "kty", + "n" + ], + "type": "object" +}; + +/** + * The schema of `api-shield_credentials-JWT-Key-common`. + */ +export const api_shield_credentials_JWT_Key_common: JsonSchema = { + "properties": { + "kid": { + "description": "Key ID", + "type": "string" + } + }, + "required": [ + "kid" + ], + "type": "object" +}; + +/** + * The schema of `api-shield_credentials-JWT-Key-oct-request`. + */ +export const api_shield_credentials_JWT_Key_oct_request: JsonSchema = { + "description": "JSON representation of a symmetric key for create/PUT requests.", + "properties": { + "alg": { + "description": "Algorithm", + "enum": [ + "HS256", + "HS384", + "HS512" + ], + "type": "string" + }, + "k": { + "description": "Symmetric key material. Required for create and PUT update requests.", + "type": "string" + }, + "kid": { + "description": "Key ID", + "type": "string" + }, + "kty": { + "description": "Key Type", + "enum": [ + "oct" + ], + "type": "string" + } + }, + "required": [ + "kid", + "alg", + "k", + "kty" + ], + "type": "object" +}; + +/** + * The schema of `api-shield_credentials-JWT-Key-request`. + */ +export const api_shield_credentials_JWT_Key_request: JsonSchema = { + "description": "JSON representation of a JWKS key for create and PUT requests.", + "oneOf": [ + { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-RSA" + }, + { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-EC-ES256" + }, + { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-EC-ES384" + }, + { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-oct-request" + } + ] +}; + +/** + * The schema of `api-shield_credentials-request`. + */ +export const api_shield_credentials_request: JsonSchema = { + "description": "Request payload for create and PUT credentials operations. Provided keys define the complete stored key set. Key identities (`{alg,kid}`) must be unique.", + "properties": { + "keys": { + "items": { + "$ref": "#/$defs/api-shield_credentials-JWT-Key-request" + }, + "maxItems": 64, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "keys" + ], + "type": "object" +}; + +/** + * The schema of `api-shield_description`. + */ +export const api_shield_description: JsonSchema = { + "type": "string" +}; + +/** + * The schema of `api-shield_header`. + */ +export const api_shield_header: JsonSchema = { + "description": "HTTP request header (must be lowercase)", + "type": "string" +}; + +/** + * The schema of `api-shield_title`. + */ +export const api_shield_title: JsonSchema = { + "type": "string" +}; + +/** + * The schema of `api-shield_token_sources`. + */ +export const api_shield_token_sources: JsonSchema = { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/api-shield_header" + }, + { + "$ref": "#/$defs/api-shield_cookie" + } + ] + }, + "maxItems": 4, + "minItems": 1, + "type": "array" +}; + +/** + * The schema of `api-shield_token_type`. + */ +export const api_shield_token_type: JsonSchema = { + "enum": [ + "JWT" + ], + "type": "string" +}; diff --git a/src/generated/forge-mcp/apiSecurity/tokenValidation/configurations/tools.ts b/src/generated/forge-mcp/apiSecurity/tokenValidation/configurations/tools.ts new file mode 100644 index 00000000..9246ee8c --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/tokenValidation/configurations/tools.ts @@ -0,0 +1,326 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { + api_shield_identifier, + api_shield_identifier_2, + api_shield_uuid, + api_shield_uuid_2, +} from "../../../schemas.js"; +import { + api_shield_cookie, + api_shield_credentials_JWT_Key_EC_ES256, + api_shield_credentials_JWT_Key_EC_ES384, + api_shield_credentials_JWT_Key_EC_common, + api_shield_credentials_JWT_Key_RSA, + api_shield_credentials_JWT_Key_common, + api_shield_credentials_JWT_Key_oct_request, + api_shield_credentials_JWT_Key_request, + api_shield_credentials_request, + api_shield_description, + api_shield_header, + api_shield_title, + api_shield_token_sources, + api_shield_token_type, +} from "./schemas.js"; + +/** + * The tools of `api_security.token_validation.configurations`. + */ +export const tools: readonly Tool[] = [ + { + name: "api_security_token_validation_configurations_create", + title: "Create a token validation configuration", + description: "Creates a JWT validation configuration for the zone.", + inputSchema: { + type: "object", + properties: { + "body": { + "properties": { + "credentials": { + "$ref": "#/$defs/api-shield_credentials-request", + "description": "Request payload for create and PUT credentials operations. Provided keys define the complete stored key set. Key identities (`{alg,kid}`) must be unique." + }, + "description": { + "$ref": "#/$defs/api-shield_description" + }, + "title": { + "$ref": "#/$defs/api-shield_title" + }, + "token_sources": { + "$ref": "#/$defs/api-shield_token_sources" + }, + "token_type": { + "$ref": "#/$defs/api-shield_token_type" + } + }, + "required": [ + "credentials", + "description", + "title", + "token_sources", + "token_type" + ], + "type": "object" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "api-shield_cookie": api_shield_cookie, + "api-shield_credentials-JWT-Key-EC-ES256": api_shield_credentials_JWT_Key_EC_ES256, + "api-shield_credentials-JWT-Key-EC-ES384": api_shield_credentials_JWT_Key_EC_ES384, + "api-shield_credentials-JWT-Key-EC-common": api_shield_credentials_JWT_Key_EC_common, + "api-shield_credentials-JWT-Key-RSA": api_shield_credentials_JWT_Key_RSA, + "api-shield_credentials-JWT-Key-common": api_shield_credentials_JWT_Key_common, + "api-shield_credentials-JWT-Key-oct-request": api_shield_credentials_JWT_Key_oct_request, + "api-shield_credentials-JWT-Key-request": api_shield_credentials_JWT_Key_request, + "api-shield_credentials-request": api_shield_credentials_request, + "api-shield_description": api_shield_description, + "api-shield_header": api_shield_header, + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_title": api_shield_title, + "api-shield_token_sources": api_shield_token_sources, + "api-shield_token_type": api_shield_token_type, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a token validation configuration" + }, + method: "POST", + path: "/zones/{zone_id}/token_validation/config", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/config`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_token_validation_configurations_delete", + title: "Delete a token validation configuration", + description: "Deletes a JWT validation configuration from the zone.\n\nConfirm with the user before calling this tool. This operation deletes the token validation configuration. The request is rejected if rules, operations, or JWT authentication identifiers still reference it.", + inputSchema: { + type: "object", + properties: { + "config_id": { + "$ref": "#/$defs/api-shield_uuid-2", + "description": "Token Configuration ID" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "config_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a token validation configuration" + }, + method: "DELETE", + path: "/zones/{zone_id}/token_validation/config/{config_id}", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/config/${pathParam(args, "config_id")}`, + }), + }, + { + name: "api_security_token_validation_configurations_edit", + title: "Edit a token validation configuration", + description: "Updates only the supplied fields on a JWT validation configuration.", + inputSchema: { + type: "object", + properties: { + "body": { + "properties": { + "description": { + "$ref": "#/$defs/api-shield_description" + }, + "title": { + "$ref": "#/$defs/api-shield_title" + }, + "token_sources": { + "$ref": "#/$defs/api-shield_token_sources" + } + }, + "type": "object" + }, + "config_id": { + "$ref": "#/$defs/api-shield_uuid-2", + "description": "Token Configuration ID" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "config_id", + "body" + ], + $defs: { + "api-shield_cookie": api_shield_cookie, + "api-shield_description": api_shield_description, + "api-shield_header": api_shield_header, + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_title": api_shield_title, + "api-shield_token_sources": api_shield_token_sources, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Edit a token validation configuration" + }, + method: "PATCH", + path: "/zones/{zone_id}/token_validation/config/{config_id}", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/config/${pathParam(args, "config_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_token_validation_configurations_get", + title: "Get a token validation configuration", + description: "Returns a JWT validation configuration by ID.", + inputSchema: { + type: "object", + properties: { + "config_id": { + "$ref": "#/$defs/api-shield_uuid-2", + "description": "Token Configuration ID" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "config_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a token validation configuration" + }, + method: "GET", + path: "/zones/{zone_id}/token_validation/config/{config_id}", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Account API Gateway Read", + "Domain API Gateway", + "Domain API Gateway Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/config/${pathParam(args, "config_id")}`, + }), + }, + { + name: "api_security_token_validation_configurations_list", + title: "List token validation configurations", + description: "Lists the JWT validation configurations defined for the zone.", + inputSchema: { + type: "object", + properties: { + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Maximum number of results per page.", + "type": "integer" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List token validation configurations" + }, + method: "GET", + path: "/zones/{zone_id}/token_validation/config", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Account API Gateway Read", + "Domain API Gateway", + "Domain API Gateway Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/config`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/apiSecurity/tokenValidation/rules/schemas.ts b/src/generated/forge-mcp/apiSecurity/tokenValidation/rules/schemas.ts new file mode 100644 index 00000000..da323e92 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/tokenValidation/rules/schemas.ts @@ -0,0 +1,260 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../_/tool.js"; + +/** + * The schema of `api-shield_action`. + */ +export const api_shield_action: JsonSchema = { + "description": "Action to take on requests that match operations included in `selector` and fail `expression`.", + "enum": [ + "log", + "block" + ], + "type": "string" +}; + +/** + * The schema of `api-shield_after`. + */ +export const api_shield_after: JsonSchema = { + "description": "Move rule to before rule with ID.", + "properties": { + "after": { + "description": "Move rule to after rule with this ID.", + "format": "uuid", + "type": "string" + } + }, + "type": "object" +}; + +/** + * The schema of `api-shield_before`. + */ +export const api_shield_before: JsonSchema = { + "description": "Move rule to after rule with ID.", + "properties": { + "before": { + "description": "Move rule to before rule with this ID.", + "format": "uuid", + "type": "string" + } + }, + "type": "object" +}; + +/** + * The schema of `api-shield_create-single-rule-request`. + */ +export const api_shield_create_single_rule_request: JsonSchema = { + "properties": { + "action": { + "$ref": "#/$defs/api-shield_action", + "description": "Action to take on requests that match operations included in `selector` and fail `expression`." + }, + "description": { + "$ref": "#/$defs/api-shield_description-2", + "description": "A human-readable description that gives more details than `title`." + }, + "enabled": { + "$ref": "#/$defs/api-shield_enabled", + "description": "Toggle rule on or off." + }, + "expression": { + "$ref": "#/$defs/api-shield_expression", + "description": "Rule expression. Requests that fail to match this expression will be subject to `action`.\n\nFor details on expressions, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/).\n" + }, + "selector": { + "$ref": "#/$defs/api-shield_selector", + "description": "Select operations covered by this rule.\n\nFor details on selectors, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/).\n" + }, + "title": { + "$ref": "#/$defs/api-shield_title-2", + "description": "A human-readable name for the rule." + } + }, + "required": [ + "action", + "description", + "enabled", + "expression", + "selector", + "title" + ], + "type": "object" +}; + +/** + * The schema of `api-shield_description-2`. + */ +export const api_shield_description_2: JsonSchema = { + "description": "A human-readable description that gives more details than `title`.", + "type": "string" +}; + +/** + * The schema of `api-shield_edit-single-rule-request`. + */ +export const api_shield_edit_single_rule_request: JsonSchema = { + "properties": { + "action": { + "$ref": "#/$defs/api-shield_action", + "description": "Action to take on requests that match operations included in `selector` and fail `expression`." + }, + "description": { + "$ref": "#/$defs/api-shield_description-2", + "description": "A human-readable description that gives more details than `title`." + }, + "enabled": { + "$ref": "#/$defs/api-shield_enabled", + "description": "Toggle rule on or off." + }, + "expression": { + "$ref": "#/$defs/api-shield_expression", + "description": "Rule expression. Requests that fail to match this expression will be subject to `action`.\n\nFor details on expressions, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/).\n" + }, + "position": { + "$ref": "#/$defs/api-shield_position", + "description": "Update rule order among zone rules." + }, + "selector": { + "$ref": "#/$defs/api-shield_selector", + "description": "Select operations covered by this rule.\n\nFor details on selectors, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/).\n" + }, + "title": { + "$ref": "#/$defs/api-shield_title-2", + "description": "A human-readable name for the rule." + } + }, + "type": "object" +}; + +/** + * The schema of `api-shield_enabled`. + */ +export const api_shield_enabled: JsonSchema = { + "description": "Toggle rule on or off.", + "type": "boolean" +}; + +/** + * The schema of `api-shield_expression`. + */ +export const api_shield_expression: JsonSchema = { + "description": "Rule expression. Requests that fail to match this expression will be subject to `action`.\n\nFor details on expressions, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/).\n", + "type": "string" +}; + +/** + * The schema of `api-shield_index`. + */ +export const api_shield_index: JsonSchema = { + "properties": { + "index": { + "description": "Move rule to this position", + "type": "integer" + } + }, + "required": [ + "index" + ], + "type": "object" +}; + +/** + * The schema of `api-shield_position`. + */ +export const api_shield_position: JsonSchema = { + "description": "Update rule order among zone rules.", + "oneOf": [ + { + "$ref": "#/$defs/api-shield_index" + }, + { + "$ref": "#/$defs/api-shield_before" + }, + { + "$ref": "#/$defs/api-shield_after" + } + ] +}; + +/** + * The schema of `api-shield_selector`. + */ +export const api_shield_selector: JsonSchema = { + "description": "Select operations covered by this rule.\n\nFor details on selectors, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/).\n", + "properties": { + "exclude": { + "description": "Ignore operations that were otherwise included by `include`.", + "oneOf": [ + { + "items": { + "$ref": "#/$defs/api-shield_selector-exclude" + }, + "type": "array" + }, + { + "type": "null" + } + ] + }, + "include": { + "description": "Select all matching operations.", + "oneOf": [ + { + "items": { + "$ref": "#/$defs/api-shield_selector-include" + }, + "type": "array" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" +}; + +/** + * The schema of `api-shield_selector-exclude`. + */ +export const api_shield_selector_exclude: JsonSchema = { + "properties": { + "operation_ids": { + "description": "Excluded operation IDs.", + "items": { + "$ref": "#/$defs/api-shield_uuid-2" + }, + "type": "array" + } + }, + "type": "object" +}; + +/** + * The schema of `api-shield_selector-include`. + */ +export const api_shield_selector_include: JsonSchema = { + "properties": { + "host": { + "description": "Included hostnames.", + "items": { + "$ref": "#/$defs/api-shield_host" + }, + "type": "array" + } + }, + "type": "object" +}; + +/** + * The schema of `api-shield_title-2`. + */ +export const api_shield_title_2: JsonSchema = { + "description": "A human-readable name for the rule.", + "type": "string" +}; diff --git a/src/generated/forge-mcp/apiSecurity/tokenValidation/rules/tools.ts b/src/generated/forge-mcp/apiSecurity/tokenValidation/rules/tools.ts new file mode 100644 index 00000000..7b7514c0 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/tokenValidation/rules/tools.ts @@ -0,0 +1,478 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { + api_shield_host, + api_shield_identifier, + api_shield_identifier_2, + api_shield_uuid, + api_shield_uuid_2, +} from "../../../schemas.js"; +import { + api_shield_action, + api_shield_after, + api_shield_before, + api_shield_create_single_rule_request, + api_shield_description_2, + api_shield_edit_single_rule_request, + api_shield_enabled, + api_shield_expression, + api_shield_index, + api_shield_position, + api_shield_selector, + api_shield_selector_exclude, + api_shield_selector_include, + api_shield_title_2, +} from "./schemas.js"; + +/** + * The tools of `api_security.token_validation.rules`. + */ +export const tools: readonly Tool[] = [ + { + name: "api_security_token_validation_rules_bulk_create", + title: "Create token validation rules", + description: "Creates multiple token validation rules for the zone in one request.", + inputSchema: { + type: "object", + properties: { + "body": { + "items": { + "$ref": "#/$defs/api-shield_create-single-rule-request" + }, + "type": "array" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "api-shield_action": api_shield_action, + "api-shield_create-single-rule-request": api_shield_create_single_rule_request, + "api-shield_description-2": api_shield_description_2, + "api-shield_enabled": api_shield_enabled, + "api-shield_expression": api_shield_expression, + "api-shield_host": api_shield_host, + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_selector": api_shield_selector, + "api-shield_selector-exclude": api_shield_selector_exclude, + "api-shield_selector-include": api_shield_selector_include, + "api-shield_title-2": api_shield_title_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create token validation rules" + }, + method: "POST", + path: "/zones/{zone_id}/token_validation/rules/bulk", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/rules/bulk`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_token_validation_rules_bulk_edit", + title: "Edit token validation rules", + description: "Updates and reorders multiple token validation rules in one request, then returns the updated rules.", + inputSchema: { + type: "object", + properties: { + "body": { + "items": { + "allOf": [ + { + "properties": { + "id": { + "description": "Rule ID this patch applies to", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + }, + { + "$ref": "#/$defs/api-shield_edit-single-rule-request" + } + ] + }, + "type": "array" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "api-shield_action": api_shield_action, + "api-shield_after": api_shield_after, + "api-shield_before": api_shield_before, + "api-shield_description-2": api_shield_description_2, + "api-shield_edit-single-rule-request": api_shield_edit_single_rule_request, + "api-shield_enabled": api_shield_enabled, + "api-shield_expression": api_shield_expression, + "api-shield_host": api_shield_host, + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_index": api_shield_index, + "api-shield_position": api_shield_position, + "api-shield_selector": api_shield_selector, + "api-shield_selector-exclude": api_shield_selector_exclude, + "api-shield_selector-include": api_shield_selector_include, + "api-shield_title-2": api_shield_title_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Edit token validation rules" + }, + method: "PATCH", + path: "/zones/{zone_id}/token_validation/rules/bulk", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/rules/bulk`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_token_validation_rules_create", + title: "Create a token validation rule", + description: "Creates a token validation rule for the zone.", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/api-shield_create-single-rule-request" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "api-shield_action": api_shield_action, + "api-shield_create-single-rule-request": api_shield_create_single_rule_request, + "api-shield_description-2": api_shield_description_2, + "api-shield_enabled": api_shield_enabled, + "api-shield_expression": api_shield_expression, + "api-shield_host": api_shield_host, + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_selector": api_shield_selector, + "api-shield_selector-exclude": api_shield_selector_exclude, + "api-shield_selector-include": api_shield_selector_include, + "api-shield_title-2": api_shield_title_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a token validation rule" + }, + method: "POST", + path: "/zones/{zone_id}/token_validation/rules", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/rules`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_token_validation_rules_delete", + title: "Delete a token validation rule", + description: "Deletes a token validation rule from the zone.\n\nConfirm with the user before calling this tool. This operation deletes the token validation rule from the zone.", + inputSchema: { + type: "object", + properties: { + "rule_id": { + "$ref": "#/$defs/api-shield_uuid-2", + "description": "Token Validation Rule ID" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "rule_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a token validation rule" + }, + method: "DELETE", + path: "/zones/{zone_id}/token_validation/rules/{rule_id}", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/rules/${pathParam(args, "rule_id")}`, + }), + }, + { + name: "api_security_token_validation_rules_edit", + title: "Edit a token validation rule", + description: "Updates only the supplied fields on a token validation rule.", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/api-shield_edit-single-rule-request" + }, + "rule_id": { + "$ref": "#/$defs/api-shield_uuid-2", + "description": "Token Validation Rule ID" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "rule_id", + "body" + ], + $defs: { + "api-shield_action": api_shield_action, + "api-shield_after": api_shield_after, + "api-shield_before": api_shield_before, + "api-shield_description-2": api_shield_description_2, + "api-shield_edit-single-rule-request": api_shield_edit_single_rule_request, + "api-shield_enabled": api_shield_enabled, + "api-shield_expression": api_shield_expression, + "api-shield_host": api_shield_host, + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_index": api_shield_index, + "api-shield_position": api_shield_position, + "api-shield_selector": api_shield_selector, + "api-shield_selector-exclude": api_shield_selector_exclude, + "api-shield_selector-include": api_shield_selector_include, + "api-shield_title-2": api_shield_title_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Edit a token validation rule" + }, + method: "PATCH", + path: "/zones/{zone_id}/token_validation/rules/{rule_id}", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Domain API Gateway" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/rules/${pathParam(args, "rule_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_token_validation_rules_get", + title: "Get a token validation rule", + description: "Returns a token validation rule by ID.", + inputSchema: { + type: "object", + properties: { + "rule_id": { + "$ref": "#/$defs/api-shield_uuid-2", + "description": "Token Validation Rule ID" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id", + "rule_id" + ], + $defs: { + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a token validation rule" + }, + method: "GET", + path: "/zones/{zone_id}/token_validation/rules/{rule_id}", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Account API Gateway Read", + "Domain API Gateway", + "Domain API Gateway Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/rules/${pathParam(args, "rule_id")}`, + }), + }, + { + name: "api_security_token_validation_rules_list", + title: "List token validation rules", + description: "Lists token validation rules for the zone, with filters for configuration, action, state, ID, and host.", + inputSchema: { + type: "object", + properties: { + "action": { + "$ref": "#/$defs/api-shield_action", + "description": "Action to take on requests that match operations included in `selector` and fail `expression`." + }, + "enabled": { + "$ref": "#/$defs/api-shield_enabled", + "description": "Toggle rule on or off." + }, + "host": { + "$ref": "#/$defs/api-shield_host", + "description": "Select rules with this host in `include`." + }, + "hostname": { + "$ref": "#/$defs/api-shield_host", + "description": "Select rules with this host in `include`." + }, + "id": { + "$ref": "#/$defs/api-shield_uuid-2", + "description": "Select rules with these IDs." + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Maximum number of results per page.", + "type": "integer" + }, + "rule_id": { + "$ref": "#/$defs/api-shield_uuid-2", + "description": "Select rules with these IDs." + }, + "token_configuration": { + "description": "Select rules using any of these token configurations.", + "items": { + "$ref": "#/$defs/api-shield_uuid-2" + }, + "type": "array" + }, + "zone_id": { + "$ref": "#/$defs/api-shield_identifier-2" + } + }, + required: [ + "zone_id" + ], + $defs: { + "api-shield_action": api_shield_action, + "api-shield_enabled": api_shield_enabled, + "api-shield_host": api_shield_host, + "api-shield_identifier": api_shield_identifier, + "api-shield_identifier-2": api_shield_identifier_2, + "api-shield_uuid": api_shield_uuid, + "api-shield_uuid-2": api_shield_uuid_2, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List token validation rules" + }, + method: "GET", + path: "/zones/{zone_id}/token_validation/rules", + extensions: { + "x-api-token-group": [ + "Account API Gateway", + "Account API Gateway Read", + "Domain API Gateway", + "Domain API Gateway Read" + ] + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/token_validation/rules`, + query: [ + ["per_page", args["per_page"], true], + ["page", args["page"], true], + ["token_configuration", args["token_configuration"], true], + ["action", args["action"], true], + ["enabled", args["enabled"], true], + ["id", args["id"], true], + ["rule_id", args["rule_id"], true], + ["host", args["host"], true], + ["hostname", args["hostname"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/credentialSets/credentials/schemas.ts b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/credentialSets/credentials/schemas.ts new file mode 100644 index 00000000..a186084a --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/credentialSets/credentials/schemas.ts @@ -0,0 +1,105 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../../_/tool.js"; + +/** + * The schema of `vuln_scanner_create-credential-request`. + */ +export const vuln_scanner_create_credential_request: JsonSchema = { + "properties": { + "location": { + "$ref": "#/$defs/vuln_scanner_credential-location", + "description": "Where the credential is attached in outgoing requests." + }, + "location_name": { + "description": "Name of the header or cookie where the credential is attached.\n", + "type": "string" + }, + "name": { + "description": "Human-readable name.", + "type": "string" + }, + "value": { + "description": "The credential value (e.g. API key, session token). Write-only.\nNever returned in responses.\n", + "type": "string" + } + }, + "required": [ + "location", + "location_name", + "name", + "value" + ], + "type": "object" +}; + +/** + * The schema of `vuln_scanner_credential-location`. + */ +export const vuln_scanner_credential_location: JsonSchema = { + "description": "Where the credential is attached in outgoing requests.", + "enum": [ + "header", + "cookie" + ], + "type": "string" +}; + +/** + * The schema of `vuln_scanner_patch-credential-request`. + */ +export const vuln_scanner_patch_credential_request: JsonSchema = { + "description": "Applies a partial update. Only the provided fields change; omitted fields remain unchanged.", + "properties": { + "location": { + "$ref": "#/$defs/vuln_scanner_credential-location", + "description": "Where the credential is attached in outgoing requests." + }, + "location_name": { + "description": "Name of the header or cookie where the credential is attached.\n", + "type": "string" + }, + "name": { + "description": "Human-readable name.", + "type": "string" + }, + "value": { + "description": "The credential value. Write-only. Never returned in responses.\n", + "type": "string" + } + }, + "type": "object" +}; + +/** + * The schema of `vuln_scanner_update-credential-request`. + */ +export const vuln_scanner_update_credential_request: JsonSchema = { + "description": "Full replacement. Provide all fields.", + "properties": { + "location": { + "$ref": "#/$defs/vuln_scanner_credential-location", + "description": "Where the credential is attached in outgoing requests." + }, + "location_name": { + "description": "Name of the header or cookie where the credential is attached.\n", + "type": "string" + }, + "name": { + "description": "Human-readable name.", + "type": "string" + }, + "value": { + "description": "The credential value. Write-only. Never returned in responses.\n", + "type": "string" + } + }, + "required": [ + "location", + "location_name", + "name", + "value" + ], + "type": "object" +}; diff --git a/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/credentialSets/credentials/tools.ts b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/credentialSets/credentials/tools.ts new file mode 100644 index 00000000..4f718c66 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/credentialSets/credentials/tools.ts @@ -0,0 +1,305 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; +import { vuln_scanner_identifier } from "../../schemas.js"; +import { + vuln_scanner_create_credential_request, + vuln_scanner_credential_location, + vuln_scanner_patch_credential_request, + vuln_scanner_update_credential_request, +} from "./schemas.js"; + +/** + * The tools of + * `api_security.vulnerability_scanner.credential_sets.credentials`. + */ +export const tools: readonly Tool[] = [ + { + name: "api_security_vulnerability_scanner_credential_sets_credentials_create", + title: "Create credential", + description: "Creates a new credential within a credential set.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "body": { + "$ref": "#/$defs/vuln_scanner_create-credential-request" + }, + "credential_set_id": { + "description": "Credential set identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "credential_set_id", + "body" + ], + $defs: { + "vuln_scanner_create-credential-request": vuln_scanner_create_credential_request, + "vuln_scanner_credential-location": vuln_scanner_credential_location, + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create credential" + }, + method: "POST", + path: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/credential_sets/${pathParam(args, "credential_set_id")}/credentials`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_vulnerability_scanner_credential_sets_credentials_delete", + title: "Delete credential", + description: "Deletes a credential.\n\nThis method is beta.\n\nConfirm with the user before calling this tool. This operation permanently deletes the credential from the credential set.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "credential_id": { + "description": "Credential identifier.", + "format": "uuid", + "type": "string" + }, + "credential_set_id": { + "description": "Credential set identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "credential_set_id", + "credential_id" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete credential" + }, + method: "DELETE", + path: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials/{credential_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/credential_sets/${pathParam(args, "credential_set_id")}/credentials/${pathParam(args, "credential_id")}`, + }), + }, + { + name: "api_security_vulnerability_scanner_credential_sets_credentials_edit", + title: "Edit credential", + description: "Updates a credential with only the provided fields; omitted fields remain unchanged.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "body": { + "$ref": "#/$defs/vuln_scanner_patch-credential-request" + }, + "credential_id": { + "description": "Credential identifier.", + "format": "uuid", + "type": "string" + }, + "credential_set_id": { + "description": "Credential set identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "credential_set_id", + "credential_id", + "body" + ], + $defs: { + "vuln_scanner_credential-location": vuln_scanner_credential_location, + "vuln_scanner_identifier": vuln_scanner_identifier, + "vuln_scanner_patch-credential-request": vuln_scanner_patch_credential_request, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Edit credential" + }, + method: "PATCH", + path: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials/{credential_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/credential_sets/${pathParam(args, "credential_set_id")}/credentials/${pathParam(args, "credential_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_vulnerability_scanner_credential_sets_credentials_get", + title: "Get credential", + description: "Returns a single credential by ID.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "credential_id": { + "description": "Credential identifier.", + "format": "uuid", + "type": "string" + }, + "credential_set_id": { + "description": "Credential set identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "credential_set_id", + "credential_id" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get credential" + }, + method: "GET", + path: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials/{credential_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/credential_sets/${pathParam(args, "credential_set_id")}/credentials/${pathParam(args, "credential_id")}`, + }), + }, + { + name: "api_security_vulnerability_scanner_credential_sets_credentials_list", + title: "List credentials", + description: "Returns all credentials within a credential set.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "credential_set_id": { + "description": "Credential set identifier.", + "format": "uuid", + "type": "string" + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Number of results per page.", + "type": "integer" + } + }, + required: [ + "account_id", + "credential_set_id" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List credentials" + }, + method: "GET", + path: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/credential_sets/${pathParam(args, "credential_set_id")}/credentials`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, + { + name: "api_security_vulnerability_scanner_credential_sets_credentials_update", + title: "Update credential", + description: "Replaces a credential. All fields must be provided.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "body": { + "$ref": "#/$defs/vuln_scanner_update-credential-request" + }, + "credential_id": { + "description": "Credential identifier.", + "format": "uuid", + "type": "string" + }, + "credential_set_id": { + "description": "Credential set identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "credential_set_id", + "credential_id", + "body" + ], + $defs: { + "vuln_scanner_credential-location": vuln_scanner_credential_location, + "vuln_scanner_identifier": vuln_scanner_identifier, + "vuln_scanner_update-credential-request": vuln_scanner_update_credential_request, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update credential" + }, + method: "PUT", + path: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}/credentials/{credential_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/credential_sets/${pathParam(args, "credential_set_id")}/credentials/${pathParam(args, "credential_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/credentialSets/schemas.ts b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/credentialSets/schemas.ts new file mode 100644 index 00000000..b7665fe6 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/credentialSets/schemas.ts @@ -0,0 +1,51 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../_/tool.js"; + +/** + * The schema of `vuln_scanner_create-credential-set-request`. + */ +export const vuln_scanner_create_credential_set_request: JsonSchema = { + "properties": { + "name": { + "description": "Human-readable name.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" +}; + +/** + * The schema of `vuln_scanner_patch-credential-set-request`. + */ +export const vuln_scanner_patch_credential_set_request: JsonSchema = { + "description": "Applies a partial update. Only the provided fields change; omitted fields remain unchanged.", + "properties": { + "name": { + "description": "Human-readable name.", + "type": "string" + } + }, + "type": "object" +}; + +/** + * The schema of `vuln_scanner_update-credential-set-request`. + */ +export const vuln_scanner_update_credential_set_request: JsonSchema = { + "description": "Full replacement. Provide all fields.", + "properties": { + "name": { + "description": "Human-readable name.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" +}; diff --git a/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/credentialSets/tools.ts b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/credentialSets/tools.ts new file mode 100644 index 00000000..3f638813 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/credentialSets/tools.ts @@ -0,0 +1,264 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { vuln_scanner_identifier } from "../schemas.js"; +import { + vuln_scanner_create_credential_set_request, + vuln_scanner_patch_credential_set_request, + vuln_scanner_update_credential_set_request, +} from "./schemas.js"; + +/** + * The tools of `api_security.vulnerability_scanner.credential_sets`. + */ +export const tools: readonly Tool[] = [ + { + name: "api_security_vulnerability_scanner_credential_sets_create", + title: "Create credential set", + description: "Creates a new credential set.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "body": { + "$ref": "#/$defs/vuln_scanner_create-credential-set-request" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "vuln_scanner_create-credential-set-request": vuln_scanner_create_credential_set_request, + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create credential set" + }, + method: "POST", + path: "/accounts/{account_id}/vuln_scanner/credential_sets", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/credential_sets`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_vulnerability_scanner_credential_sets_delete", + title: "Delete credential set", + description: "Deletes a credential set and all of its credentials.\n\nThis method is beta.\n\nConfirm with the user before calling this tool. This operation permanently deletes the credential set and every credential it contains.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "credential_set_id": { + "description": "Credential set identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "credential_set_id" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete credential set" + }, + method: "DELETE", + path: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/credential_sets/${pathParam(args, "credential_set_id")}`, + }), + }, + { + name: "api_security_vulnerability_scanner_credential_sets_edit", + title: "Edit credential set", + description: "Updates a credential set with only the provided fields; omitted fields remain unchanged.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "body": { + "$ref": "#/$defs/vuln_scanner_patch-credential-set-request" + }, + "credential_set_id": { + "description": "Credential set identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "credential_set_id", + "body" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + "vuln_scanner_patch-credential-set-request": vuln_scanner_patch_credential_set_request, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Edit credential set" + }, + method: "PATCH", + path: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/credential_sets/${pathParam(args, "credential_set_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_vulnerability_scanner_credential_sets_get", + title: "Get credential set", + description: "Returns a single credential set by ID.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "credential_set_id": { + "description": "Credential set identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "credential_set_id" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get credential set" + }, + method: "GET", + path: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/credential_sets/${pathParam(args, "credential_set_id")}`, + }), + }, + { + name: "api_security_vulnerability_scanner_credential_sets_list", + title: "List credential sets", + description: "Returns all credential sets for the account.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Number of results per page.", + "type": "integer" + } + }, + required: [ + "account_id" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List credential sets" + }, + method: "GET", + path: "/accounts/{account_id}/vuln_scanner/credential_sets", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/credential_sets`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, + { + name: "api_security_vulnerability_scanner_credential_sets_update", + title: "Update credential set", + description: "Replaces a credential set. All fields must be provided.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "body": { + "$ref": "#/$defs/vuln_scanner_update-credential-set-request" + }, + "credential_set_id": { + "description": "Credential set identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "credential_set_id", + "body" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + "vuln_scanner_update-credential-set-request": vuln_scanner_update_credential_set_request, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update credential set" + }, + method: "PUT", + path: "/accounts/{account_id}/vuln_scanner/credential_sets/{credential_set_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/credential_sets/${pathParam(args, "credential_set_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/scans/schemas.ts b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/scans/schemas.ts new file mode 100644 index 00000000..9237205c --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/scans/schemas.ts @@ -0,0 +1,70 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../_/tool.js"; + +/** + * The schema of `vuln_scanner_bola-credential-sets`. + */ +export const vuln_scanner_bola_credential_sets: JsonSchema = { + "description": "Credential set references for a BOLA scan. The scanner uses the\n`owner` credentials for legitimate requests and the `attacker`\ncredentials to attempt unauthorized access.\n", + "properties": { + "attacker": { + "description": "Credential set ID for the attacker.", + "format": "uuid", + "type": "string" + }, + "owner": { + "description": "Credential set ID for the resource owner.", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "attacker", + "owner" + ], + "type": "object" +}; + +/** + * The schema of `vuln_scanner_create-bola-scan-request`. + */ +export const vuln_scanner_create_bola_scan_request: JsonSchema = { + "properties": { + "credential_sets": { + "$ref": "#/$defs/vuln_scanner_bola-credential-sets", + "description": "Credential set references for a BOLA scan. The scanner uses the\n`owner` credentials for legitimate requests and the `attacker`\ncredentials to attempt unauthorized access.\n" + }, + "open_api": { + "description": "OpenAPI schema definition for the API under test. The scanner\nuses this to discover endpoints and construct requests.\n", + "type": "string" + }, + "scan_type": { + "enum": [ + "bola" + ], + "type": "string" + }, + "target_environment_id": { + "description": "The target environment to scan.", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "credential_sets", + "open_api", + "scan_type", + "target_environment_id" + ], + "type": "object" +}; + +/** + * The schema of `vuln_scanner_create-scan-request`. + */ +export const vuln_scanner_create_scan_request: JsonSchema = { + "$ref": "#/$defs/vuln_scanner_create-bola-scan-request", + "description": "Create a new vulnerability scan. The `scan_type` discriminator\nselects the scan variant and its required context fields.\n" +}; diff --git a/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/scans/tools.ts b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/scans/tools.ts new file mode 100644 index 00000000..f3b25e2c --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/scans/tools.ts @@ -0,0 +1,178 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { vuln_scanner_identifier } from "../schemas.js"; +import { + vuln_scanner_bola_credential_sets, + vuln_scanner_create_bola_scan_request, + vuln_scanner_create_scan_request, +} from "./schemas.js"; + +/** + * The tools of `api_security.vulnerability_scanner.scans`. + */ +export const tools: readonly Tool[] = [ + { + name: "api_security_vulnerability_scanner_scans_create", + title: "Create scan", + description: "Creates and starts a new vulnerability scan. The response may include non-fatal warnings in the `messages` array.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "body": { + "$ref": "#/$defs/vuln_scanner_create-scan-request" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "vuln_scanner_bola-credential-sets": vuln_scanner_bola_credential_sets, + "vuln_scanner_create-bola-scan-request": vuln_scanner_create_bola_scan_request, + "vuln_scanner_create-scan-request": vuln_scanner_create_scan_request, + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create scan" + }, + method: "POST", + path: "/accounts/{account_id}/vuln_scanner/scans", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/scans`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_vulnerability_scanner_scans_delete", + title: "Delete scan", + description: "Deletes a scan and all associated data. Only scans in a terminal state (`finished`, `failed`) may be deleted. Attempting to delete a scan that is still being created or executed (`created`, `scheduled`, `planning`, `running`) returns `400`.\n\nThis method is beta.\n\nConfirm with the user before calling this tool. This operation permanently deletes the completed or failed scan and all associated scan data.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "scan_id": { + "description": "Scan identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "scan_id" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete scan" + }, + method: "DELETE", + path: "/accounts/{account_id}/vuln_scanner/scans/{scan_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/scans/${pathParam(args, "scan_id")}`, + }), + }, + { + name: "api_security_vulnerability_scanner_scans_get", + title: "Get scan", + description: "Returns a single scan by ID.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "scan_id": { + "description": "Scan identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "scan_id" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get scan" + }, + method: "GET", + path: "/accounts/{account_id}/vuln_scanner/scans/{scan_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/scans/${pathParam(args, "scan_id")}`, + }), + }, + { + name: "api_security_vulnerability_scanner_scans_list", + title: "List scans", + description: "Returns all scans for the account.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Number of results per page.", + "type": "integer" + } + }, + required: [ + "account_id" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List scans" + }, + method: "GET", + path: "/accounts/{account_id}/vuln_scanner/scans", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/scans`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/schemas.ts b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/schemas.ts new file mode 100644 index 00000000..fe63e74e --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/schemas.ts @@ -0,0 +1,12 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `vuln_scanner_identifier`. + */ +export const vuln_scanner_identifier: JsonSchema = { + "description": "Identifier.", + "type": "string" +}; diff --git a/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/targetEnvironments/schemas.ts b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/targetEnvironments/schemas.ts new file mode 100644 index 00000000..6b9c4951 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/targetEnvironments/schemas.ts @@ -0,0 +1,129 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../../_/tool.js"; + +/** + * The schema of `vuln_scanner_create-target-environment-request`. + */ +export const vuln_scanner_create_target_environment_request: JsonSchema = { + "properties": { + "description": { + "description": "Optional description.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "description": "Human-readable name.", + "type": "string" + }, + "target": { + "$ref": "#/$defs/vuln_scanner_target-type", + "description": "Identifies the Cloudflare asset to scan. Uses a `type` discriminator.\nCurrently the service supports only `zone` targets.\n" + } + }, + "required": [ + "name", + "target" + ], + "type": "object" +}; + +/** + * The schema of `vuln_scanner_patch-target-environment-request`. + */ +export const vuln_scanner_patch_target_environment_request: JsonSchema = { + "description": "Applies a partial update. Only the provided fields change; omitted fields remain unchanged.\n\nThe `description` field supports three states:\n- **omitted**: leave unchanged\n- **`null`**: clear the description\n- **`\"value\"`**: set to the given string\n", + "properties": { + "description": { + "description": "Optional description. Omit to leave unchanged, set to `null`\nto clear, or provide a string to update.\n", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "description": "Human-readable name.", + "type": "string" + }, + "target": { + "$ref": "#/$defs/vuln_scanner_target-type", + "description": "Identifies the Cloudflare asset to scan. Uses a `type` discriminator.\nCurrently the service supports only `zone` targets.\n" + } + }, + "type": "object" +}; + +/** + * The schema of `vuln_scanner_target-type`. + */ +export const vuln_scanner_target_type: JsonSchema = { + "$ref": "#/$defs/vuln_scanner_zone-target", + "description": "Identifies the Cloudflare asset to scan. Uses a `type` discriminator.\nCurrently the service supports only `zone` targets.\n" +}; + +/** + * The schema of `vuln_scanner_update-target-environment-request`. + */ +export const vuln_scanner_update_target_environment_request: JsonSchema = { + "description": "Full replacement.", + "properties": { + "description": { + "description": "Optional description.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "description": "Human-readable name.", + "type": "string" + }, + "target": { + "$ref": "#/$defs/vuln_scanner_target-type", + "description": "Identifies the Cloudflare asset to scan. Uses a `type` discriminator.\nCurrently the service supports only `zone` targets.\n" + } + }, + "required": [ + "name", + "target" + ], + "type": "object" +}; + +/** + * The schema of `vuln_scanner_zone-target`. + */ +export const vuln_scanner_zone_target: JsonSchema = { + "properties": { + "type": { + "enum": [ + "zone" + ], + "type": "string" + }, + "zone_tag": { + "description": "Cloudflare zone tag. The zone must belong to the account.\n", + "type": "string" + } + }, + "required": [ + "type", + "zone_tag" + ], + "type": "object" +}; diff --git a/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/targetEnvironments/tools.ts b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/targetEnvironments/tools.ts new file mode 100644 index 00000000..386ea784 --- /dev/null +++ b/src/generated/forge-mcp/apiSecurity/vulnerabilityScanner/targetEnvironments/tools.ts @@ -0,0 +1,272 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; +import { vuln_scanner_identifier } from "../schemas.js"; +import { + vuln_scanner_create_target_environment_request, + vuln_scanner_patch_target_environment_request, + vuln_scanner_target_type, + vuln_scanner_update_target_environment_request, + vuln_scanner_zone_target, +} from "./schemas.js"; + +/** + * The tools of `api_security.vulnerability_scanner.target_environments`. + */ +export const tools: readonly Tool[] = [ + { + name: "api_security_vulnerability_scanner_target_environments_create", + title: "Create target environment", + description: "Creates a new target environment for the account.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "body": { + "$ref": "#/$defs/vuln_scanner_create-target-environment-request" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "vuln_scanner_create-target-environment-request": vuln_scanner_create_target_environment_request, + "vuln_scanner_identifier": vuln_scanner_identifier, + "vuln_scanner_target-type": vuln_scanner_target_type, + "vuln_scanner_zone-target": vuln_scanner_zone_target, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create target environment" + }, + method: "POST", + path: "/accounts/{account_id}/vuln_scanner/target_environments", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/target_environments`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_vulnerability_scanner_target_environments_delete", + title: "Delete target environment", + description: "Removes a target environment.\n\nThis method is beta.\n\nConfirm with the user before calling this tool. This operation permanently deletes the target environment from Vulnerability Scanner.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "target_environment_id": { + "description": "Target environment identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "target_environment_id" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete target environment" + }, + method: "DELETE", + path: "/accounts/{account_id}/vuln_scanner/target_environments/{target_environment_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/target_environments/${pathParam(args, "target_environment_id")}`, + }), + }, + { + name: "api_security_vulnerability_scanner_target_environments_edit", + title: "Edit target environment", + description: "Updates a target environment with only the provided fields; omitted fields remain unchanged.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "body": { + "$ref": "#/$defs/vuln_scanner_patch-target-environment-request" + }, + "target_environment_id": { + "description": "Target environment identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "target_environment_id", + "body" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + "vuln_scanner_patch-target-environment-request": vuln_scanner_patch_target_environment_request, + "vuln_scanner_target-type": vuln_scanner_target_type, + "vuln_scanner_zone-target": vuln_scanner_zone_target, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Edit target environment" + }, + method: "PATCH", + path: "/accounts/{account_id}/vuln_scanner/target_environments/{target_environment_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/target_environments/${pathParam(args, "target_environment_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "api_security_vulnerability_scanner_target_environments_get", + title: "Get target environment", + description: "Returns a single target environment by ID.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "target_environment_id": { + "description": "Target environment identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "target_environment_id" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get target environment" + }, + method: "GET", + path: "/accounts/{account_id}/vuln_scanner/target_environments/{target_environment_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/target_environments/${pathParam(args, "target_environment_id")}`, + }), + }, + { + name: "api_security_vulnerability_scanner_target_environments_list", + title: "List target environments", + description: "Returns all target environments for the account.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "page": { + "default": 1, + "description": "Page number of paginated results.", + "type": "integer" + }, + "per_page": { + "default": 20, + "description": "Number of results per page.", + "type": "integer" + } + }, + required: [ + "account_id" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List target environments" + }, + method: "GET", + path: "/accounts/{account_id}/vuln_scanner/target_environments", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/target_environments`, + query: [ + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, + { + name: "api_security_vulnerability_scanner_target_environments_update", + title: "Update target environment", + description: "Replaces a target environment. All fields must be provided.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/vuln_scanner_identifier", + "description": "Account identifier." + }, + "body": { + "$ref": "#/$defs/vuln_scanner_update-target-environment-request" + }, + "target_environment_id": { + "description": "Target environment identifier.", + "format": "uuid", + "type": "string" + } + }, + required: [ + "account_id", + "target_environment_id", + "body" + ], + $defs: { + "vuln_scanner_identifier": vuln_scanner_identifier, + "vuln_scanner_target-type": vuln_scanner_target_type, + "vuln_scanner_update-target-environment-request": vuln_scanner_update_target_environment_request, + "vuln_scanner_zone-target": vuln_scanner_zone_target, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update target environment" + }, + method: "PUT", + path: "/accounts/{account_id}/vuln_scanner/target_environments/{target_environment_id}", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/vuln_scanner/target_environments/${pathParam(args, "target_environment_id")}`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/argo/smartRouting/schemas.ts b/src/generated/forge-mcp/argo/smartRouting/schemas.ts new file mode 100644 index 00000000..4eefbdd7 --- /dev/null +++ b/src/generated/forge-mcp/argo/smartRouting/schemas.ts @@ -0,0 +1,33 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `argo-config_patch`. + */ +export const argo_config_patch: JsonSchema = { + "description": "Configures the enablement of Argo Smart Routing.", + "properties": { + "value": { + "$ref": "#/$defs/argo-config_setting_value", + "description": "Specifies the enablement value of Argo Smart Routing." + } + }, + "required": [ + "value" + ], + "type": "object" +}; + +/** + * The schema of `argo-config_setting_value`. + */ +export const argo_config_setting_value: JsonSchema = { + "description": "Specifies the enablement value of Argo Smart Routing.", + "enum": [ + "on", + "off" + ], + "type": "string" +}; diff --git a/src/generated/forge-mcp/argo/smartRouting/tools.ts b/src/generated/forge-mcp/argo/smartRouting/tools.ts new file mode 100644 index 00000000..72010f63 --- /dev/null +++ b/src/generated/forge-mcp/argo/smartRouting/tools.ts @@ -0,0 +1,223 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { argo_config_patch, argo_config_setting_value } from "./schemas.js"; + +/** + * The tools of `argo.smart_routing`. + */ +export const tools: readonly Tool[] = [ + { + name: "argo_smart_routing_count_zones_enabled_for_account", + title: "Get count of zones with Argo Smart Routing enabled for account", + description: "Returns the number of zones that have Argo Smart Routing enabled for the specified account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier of the account.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get count of zones with Argo Smart Routing enabled for account" + }, + method: "GET", + path: "/accounts/{account_id}/argo/count_zones_enabled", + extensions: { + "x-api-token-group": [ + "Trust and Safety Write", + "Trust and Safety Read", + "Zone Read", + "Zone Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#zone_settings:read" + ], + "x-fern-enum": { + "#zone_settings:read": { + "name": "zone_settings_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/argo/count_zones_enabled`, + }), + }, + { + name: "argo_smart_routing_count_zones_enabled_for_user", + title: "Get count of zones with Argo Smart Routing enabled for user", + description: "Returns the number of zones that have Argo Smart Routing enabled for the authenticated user.", + inputSchema: { + type: "object", + properties: {}, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get count of zones with Argo Smart Routing enabled for user" + }, + method: "GET", + path: "/user/argo/count_zones_enabled", + extensions: { + "x-api-token-group": [ + "Trust and Safety Write", + "Trust and Safety Read", + "Zone Read", + "Zone Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#zone_settings:read" + ], + "x-fern-enum": { + "#zone_settings:read": { + "name": "zone_settings_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (_args) => ({ + path: `/user/argo/count_zones_enabled`, + }), + }, + { + name: "argo_smart_routing_edit", + title: "Patch Argo Smart Routing setting", + description: "Configures the value of the Argo Smart Routing enablement setting.", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/argo-config_patch" + }, + "zone_id": { + "description": "Specifies the zone associated with the API call.", + "type": "string" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "argo-config_patch": argo_config_patch, + "argo-config_setting_value": argo_config_setting_value, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Patch Argo Smart Routing setting" + }, + method: "PATCH", + path: "/zones/{zone_id}/argo/smart_routing", + extensions: { + "x-api-token-group": [ + "Zone Settings Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#zone_settings:read", + "#zone_settings:edit" + ], + "x-fern-enum": { + "#zone_settings:edit": { + "name": "zone_settings_edit" + }, + "#zone_settings:read": { + "name": "zone_settings_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/argo/smart_routing`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "argo_smart_routing_get", + title: "Get Argo Smart Routing setting", + description: "Retrieves the value of Argo Smart Routing enablement setting.", + inputSchema: { + type: "object", + properties: { + "zone_id": { + "description": "Specifies the zone associated with the API call.", + "type": "string" + } + }, + required: [ + "zone_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Argo Smart Routing setting" + }, + method: "GET", + path: "/zones/{zone_id}/argo/smart_routing", + extensions: { + "x-api-token-group": [ + "Zone Settings Write", + "Zone Settings Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#zone_settings:read" + ], + "x-fern-enum": { + "#zone_settings:read": { + "name": "zone_settings_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/argo/smart_routing`, + }), + }, +]; diff --git a/src/generated/forge-mcp/argo/tieredCaching/schemas.ts b/src/generated/forge-mcp/argo/tieredCaching/schemas.ts new file mode 100644 index 00000000..a49fe44e --- /dev/null +++ b/src/generated/forge-mcp/argo/tieredCaching/schemas.ts @@ -0,0 +1,33 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `cache-settings_patch`. + */ +export const cache_settings_patch: JsonSchema = { + "description": "Update enablement of Tiered Caching.", + "properties": { + "value": { + "$ref": "#/$defs/cache-settings_value", + "description": "Enables Tiered Caching." + } + }, + "required": [ + "value" + ], + "type": "object" +}; + +/** + * The schema of `cache-settings_value`. + */ +export const cache_settings_value: JsonSchema = { + "description": "Enables Tiered Caching.", + "enum": [ + "on", + "off" + ], + "type": "string" +}; diff --git a/src/generated/forge-mcp/argo/tieredCaching/tools.ts b/src/generated/forge-mcp/argo/tieredCaching/tools.ts new file mode 100644 index 00000000..929738ba --- /dev/null +++ b/src/generated/forge-mcp/argo/tieredCaching/tools.ts @@ -0,0 +1,94 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { cache_settings_patch, cache_settings_value } from "./schemas.js"; + +/** + * The tools of `argo.tiered_caching`. + */ +export const tools: readonly Tool[] = [ + { + name: "argo_tiered_caching_edit", + title: "Patch Tiered Caching setting", + description: "Tiered Cache works by dividing Cloudflare's data centers into a hierarchy of lower-tiers and upper-tiers. If content is not cached in lower-tier data centers (generally the ones closest to a visitor), the lower-tier must ask an upper-tier to see if it has the content. If the upper-tier does not have the content, only the upper-tier can ask the origin for content. This practice improves bandwidth efficiency by limiting the number of data centers that can ask the origin for content, which reduces origin load and makes websites more cost-effective to operate. Additionally, Tiered Cache concentrates connections to origin servers so they come from a small number of data centers rather than the full set of network locations. This results in fewer open connections using server resources.", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/cache-settings_patch" + }, + "zone_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "cache-settings_patch": cache_settings_patch, + "cache-settings_value": cache_settings_value, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Patch Tiered Caching setting" + }, + method: "PATCH", + path: "/zones/{zone_id}/argo/tiered_caching", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/argo/tiered_caching`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "argo_tiered_caching_get", + title: "Get Tiered Caching setting", + description: "Tiered Cache works by dividing Cloudflare's data centers into a hierarchy of lower-tiers and upper-tiers. If content is not cached in lower-tier data centers (generally the ones closest to a visitor), the lower-tier must ask an upper-tier to see if it has the content. If the upper-tier does not have the content, only the upper-tier can ask the origin for content. This practice improves bandwidth efficiency by limiting the number of data centers that can ask the origin for content, which reduces origin load and makes websites more cost-effective to operate. Additionally, Tiered Cache concentrates connections to origin servers so they come from a small number of data centers rather than the full set of network locations. This results in fewer open connections using server resources.", + inputSchema: { + type: "object", + properties: { + "zone_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "zone_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Tiered Caching setting" + }, + method: "GET", + path: "/zones/{zone_id}/argo/tiered_caching", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/argo/tiered_caching`, + }), + }, +]; diff --git a/src/generated/forge-mcp/artifacts/namespaces/repos/blobs/tools.ts b/src/generated/forge-mcp/artifacts/namespaces/repos/blobs/tools.ts new file mode 100644 index 00000000..82f98e58 --- /dev/null +++ b/src/generated/forge-mcp/artifacts/namespaces/repos/blobs/tools.ts @@ -0,0 +1,60 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; + +/** + * The tools of `artifacts.namespaces.repos.blobs`. + */ +export const tools: readonly Tool[] = [ + { + name: "artifacts_namespaces_repos_blobs_get", + title: "Read a Git blob", + description: "Returns raw bytes for an immutable Git blob object. Blob responses are cacheable forever by hash.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "hash": { + "description": "40-character lowercase hexadecimal Git object hash.", + "type": "string" + }, + "name": { + "description": "Repository name.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "name", + "hash" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Read a Git blob" + }, + method: "GET", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/repos/{name}/blob/{hash}", + extensions: { + "x-api-token-group": [ + "Artifacts Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/repos/${pathParam(args, "name")}/blob/${pathParam(args, "hash")}`, + }), + }, +]; diff --git a/src/generated/forge-mcp/artifacts/namespaces/repos/commits/tools.ts b/src/generated/forge-mcp/artifacts/namespaces/repos/commits/tools.ts new file mode 100644 index 00000000..981d740c --- /dev/null +++ b/src/generated/forge-mcp/artifacts/namespaces/repos/commits/tools.ts @@ -0,0 +1,60 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; + +/** + * The tools of `artifacts.namespaces.repos.commits`. + */ +export const tools: readonly Tool[] = [ + { + name: "artifacts_namespaces_repos_commits_get", + title: "Read a Git commit", + description: "Returns decoded metadata for an immutable Git commit object. Commit responses are cacheable forever by hash.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "hash": { + "description": "40-character lowercase hexadecimal Git object hash.", + "type": "string" + }, + "name": { + "description": "Repository name.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "name", + "hash" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Read a Git commit" + }, + method: "GET", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/repos/{name}/commit/{hash}", + extensions: { + "x-api-token-group": [ + "Artifacts Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/repos/${pathParam(args, "name")}/commit/${pathParam(args, "hash")}`, + }), + }, +]; diff --git a/src/generated/forge-mcp/artifacts/namespaces/repos/files/tools.ts b/src/generated/forge-mcp/artifacts/namespaces/repos/files/tools.ts new file mode 100644 index 00000000..53cae4d3 --- /dev/null +++ b/src/generated/forge-mcp/artifacts/namespaces/repos/files/tools.ts @@ -0,0 +1,69 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; + +/** + * The tools of `artifacts.namespaces.repos.files`. + */ +export const tools: readonly Tool[] = [ + { + name: "artifacts_namespaces_repos_files_get", + title: "Read a file", + description: "Returns raw bytes for a file resolved by ref and path.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "name": { + "description": "Repository name.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + }, + "path": { + "description": "File path.", + "type": "string" + }, + "ref": { + "description": "Git ref, branch, tag, or commit hash.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "name", + "ref", + "path" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Read a file" + }, + method: "GET", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/repos/{name}/file", + extensions: { + "x-api-token-group": [ + "Artifacts Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/repos/${pathParam(args, "name")}/file`, + query: [ + ["ref", args["ref"], true], + ["path", args["path"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/artifacts/namespaces/repos/logs/tools.ts b/src/generated/forge-mcp/artifacts/namespaces/repos/logs/tools.ts new file mode 100644 index 00000000..b877aabf --- /dev/null +++ b/src/generated/forge-mcp/artifacts/namespaces/repos/logs/tools.ts @@ -0,0 +1,70 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; + +/** + * The tools of `artifacts.namespaces.repos.logs`. + */ +export const tools: readonly Tool[] = [ + { + name: "artifacts_namespaces_repos_logs_get", + title: "Read commit history", + description: "Returns commit metadata walking backwards from a ref, branch, tag, or HEAD.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "limit": { + "type": "integer" + }, + "name": { + "description": "Repository name.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + }, + "offset": { + "type": "integer" + }, + "ref": { + "description": "Git ref, branch, tag, or commit hash. Defaults to HEAD.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Read commit history" + }, + method: "GET", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/repos/{name}/log", + extensions: { + "x-api-token-group": [ + "Artifacts Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/repos/${pathParam(args, "name")}/log`, + query: [ + ["ref", args["ref"], true], + ["limit", args["limit"], true], + ["offset", args["offset"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/artifacts/namespaces/repos/raw/tools.ts b/src/generated/forge-mcp/artifacts/namespaces/repos/raw/tools.ts new file mode 100644 index 00000000..ea2aac50 --- /dev/null +++ b/src/generated/forge-mcp/artifacts/namespaces/repos/raw/tools.ts @@ -0,0 +1,65 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; + +/** + * The tools of `artifacts.namespaces.repos.raw`. + */ +export const tools: readonly Tool[] = [ + { + name: "artifacts_namespaces_repos_raw_get", + title: "Read a raw file with content type", + description: "Returns file bytes resolved by ref and path, with a sniffed content type and browser-safe response headers.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "name": { + "description": "Repository name.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + }, + "path": { + "description": "File path. May contain slashes.", + "type": "string" + }, + "ref": { + "description": "Git ref, branch, tag, or 40-character commit hash.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "name", + "ref", + "path" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Read a raw file with content type" + }, + method: "GET", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/repos/{name}/raw/{ref}/{path}", + extensions: { + "x-api-token-group": [ + "Artifacts Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/repos/${pathParam(args, "name")}/raw/${pathParam(args, "ref")}/${pathParam(args, "path")}`, + }), + }, +]; diff --git a/src/generated/forge-mcp/artifacts/namespaces/repos/tokens/tools.ts b/src/generated/forge-mcp/artifacts/namespaces/repos/tokens/tools.ts new file mode 100644 index 00000000..0f35d68a --- /dev/null +++ b/src/generated/forge-mcp/artifacts/namespaces/repos/tokens/tools.ts @@ -0,0 +1,78 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; + +/** + * The tools of `artifacts.namespaces.repos.tokens`. + */ +export const tools: readonly Tool[] = [ + { + name: "artifacts_namespaces_repos_tokens_list", + title: "List repository tokens", + description: "Lists tokens for a repository.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "name": { + "description": "Repository name.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + }, + "page": { + "default": 1, + "type": "integer" + }, + "per_page": { + "default": 30, + "type": "integer" + }, + "state": { + "default": "active", + "enum": [ + "active", + "expired", + "revoked", + "all" + ], + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List repository tokens" + }, + method: "GET", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/repos/{name}/tokens", + extensions: { + "x-api-token-group": [ + "Artifacts Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/repos/${pathParam(args, "name")}/tokens`, + query: [ + ["state", args["state"], true], + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/artifacts/namespaces/repos/tools.ts b/src/generated/forge-mcp/artifacts/namespaces/repos/tools.ts new file mode 100644 index 00000000..ad0322b6 --- /dev/null +++ b/src/generated/forge-mcp/artifacts/namespaces/repos/tools.ts @@ -0,0 +1,367 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `artifacts.namespaces.repos`. + */ +export const tools: readonly Tool[] = [ + { + name: "artifacts_namespaces_repos_create", + title: "Create a repository", + description: "Creates a Git-compatible Artifacts repository in a namespace.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "body": { + "properties": { + "default_branch": { + "description": "Git branch name. Must match /^[a-zA-Z0-9][a-zA-Z0-9._/-]*$/, must not contain '..', and must not end with '/' or '.'.", + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "read_only": { + "type": "boolean" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a repository" + }, + method: "POST", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/repos", + extensions: { + "x-api-token-group": [ + "Artifacts Edit" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/repos`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "artifacts_namespaces_repos_delete", + title: "Delete a repository", + description: "Deletes a repository and schedules cleanup of its backing data.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "name": { + "description": "Repository name.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "name" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a repository" + }, + method: "DELETE", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/repos/{name}", + extensions: { + "x-api-token-group": [ + "Artifacts Edit" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/repos/${pathParam(args, "name")}`, + }), + }, + { + name: "artifacts_namespaces_repos_fork", + title: "Fork a repository", + description: "Forks a source repository into a new repository.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "body": { + "properties": { + "default_branch_only": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "read_only": { + "type": "boolean" + } + }, + "type": "object" + }, + "name": { + "description": "Repository name.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "name", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Fork a repository" + }, + method: "POST", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/repos/{name}/fork", + extensions: { + "x-api-token-group": [ + "Artifacts Edit" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/repos/${pathParam(args, "name")}/fork`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "artifacts_namespaces_repos_get", + title: "Get a repository", + description: "Returns repository metadata.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "name": { + "description": "Repository name.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a repository" + }, + method: "GET", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/repos/{name}", + extensions: { + "x-api-token-group": [ + "Artifacts Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/repos/${pathParam(args, "name")}`, + }), + }, + { + name: "artifacts_namespaces_repos_import", + title: "Import a repository", + description: "Imports an HTTPS Git repository into an Artifacts repository.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "body": { + "properties": { + "branch": { + "description": "Git branch name. Must match /^[a-zA-Z0-9][a-zA-Z0-9._/-]*$/, must not contain '..', and must not end with '/' or '.'.", + "type": "string" + }, + "depth": { + "type": "integer" + }, + "read_only": { + "type": "boolean" + }, + "url": { + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "name": { + "description": "Repository name.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "name", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Import a repository" + }, + method: "POST", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/repos/{name}/import", + extensions: { + "x-api-token-group": [ + "Artifacts Edit" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/repos/${pathParam(args, "name")}/import`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "artifacts_namespaces_repos_list", + title: "List repositories", + description: "Lists repositories in a namespace.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "cursor": { + "type": "string" + }, + "direction": { + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "limit": { + "default": 50, + "type": "integer" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + }, + "search": { + "type": "string" + }, + "sort": { + "default": "created_at", + "enum": [ + "created_at", + "updated_at", + "last_push_at", + "name" + ], + "type": "string" + } + }, + required: [ + "account_id", + "namespace" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List repositories" + }, + method: "GET", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/repos", + extensions: { + "x-api-token-group": [ + "Artifacts Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/repos`, + query: [ + ["limit", args["limit"], true], + ["cursor", args["cursor"], true], + ["search", args["search"], true], + ["sort", args["sort"], true], + ["direction", args["direction"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/artifacts/namespaces/repos/trees/tools.ts b/src/generated/forge-mcp/artifacts/namespaces/repos/trees/tools.ts new file mode 100644 index 00000000..0272d9d2 --- /dev/null +++ b/src/generated/forge-mcp/artifacts/namespaces/repos/trees/tools.ts @@ -0,0 +1,60 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; + +/** + * The tools of `artifacts.namespaces.repos.trees`. + */ +export const tools: readonly Tool[] = [ + { + name: "artifacts_namespaces_repos_trees_get", + title: "Read a Git tree", + description: "Returns decoded entries for an immutable Git tree object. Tree responses are cacheable forever by hash.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "hash": { + "description": "40-character lowercase hexadecimal Git object hash.", + "type": "string" + }, + "name": { + "description": "Repository name.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "name", + "hash" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Read a Git tree" + }, + method: "GET", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/repos/{name}/tree/{hash}", + extensions: { + "x-api-token-group": [ + "Artifacts Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/repos/${pathParam(args, "name")}/tree/${pathParam(args, "hash")}`, + }), + }, +]; diff --git a/src/generated/forge-mcp/artifacts/namespaces/tokens/tools.ts b/src/generated/forge-mcp/artifacts/namespaces/tokens/tools.ts new file mode 100644 index 00000000..fedd0a6d --- /dev/null +++ b/src/generated/forge-mcp/artifacts/namespaces/tokens/tools.ts @@ -0,0 +1,118 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `artifacts.namespaces.tokens`. + */ +export const tools: readonly Tool[] = [ + { + name: "artifacts_namespaces_tokens_create", + title: "Create a repository token", + description: "Creates a scoped Git token for a repository.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "body": { + "properties": { + "repo": { + "type": "string" + }, + "scope": { + "enum": [ + "read", + "write" + ], + "type": "string" + }, + "ttl": { + "type": "integer" + } + }, + "required": [ + "repo" + ], + "type": "object" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a repository token" + }, + method: "POST", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/tokens", + extensions: { + "x-api-token-group": [ + "Artifacts Edit" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/tokens`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "artifacts_namespaces_tokens_revoke", + title: "Revoke a token", + description: "Revokes an Artifacts repository token. Token IDs are resolved through an eventually consistent index, so revoking a token within about a second of creating it can return 404; retry after a short delay.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "id": { + "description": "Token ID. Must match /^[0-9a-z]{16}$/.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace", + "id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Revoke a token" + }, + method: "DELETE", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}/tokens/{id}", + extensions: { + "x-api-token-group": [ + "Artifacts Edit" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}/tokens/${pathParam(args, "id")}`, + }), + }, +]; diff --git a/src/generated/forge-mcp/artifacts/namespaces/tools.ts b/src/generated/forge-mcp/artifacts/namespaces/tools.ts new file mode 100644 index 00000000..a6e1ed7b --- /dev/null +++ b/src/generated/forge-mcp/artifacts/namespaces/tools.ts @@ -0,0 +1,194 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `artifacts.namespaces`. + */ +export const tools: readonly Tool[] = [ + { + name: "artifacts_namespaces_create", + title: "Create a namespace", + description: "Creates an empty Artifacts namespace for an account.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "body": { + "properties": { + "jurisdiction": { + "default": "unrestricted", + "enum": [ + "unrestricted", + "us", + "eu", + "fedramp" + ], + "type": "string" + }, + "namespace": { + "type": "string" + } + }, + "required": [ + "namespace" + ], + "type": "object" + } + }, + required: [ + "account_id", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create a namespace" + }, + method: "POST", + path: "/accounts/{account_id}/artifacts/namespaces", + extensions: { + "x-api-token-group": [ + "Artifacts Edit" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "artifacts_namespaces_delete", + title: "Delete a namespace", + description: "Deletes an empty Artifacts namespace.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete a namespace" + }, + method: "DELETE", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}", + extensions: { + "x-api-token-group": [ + "Artifacts Edit" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}`, + }), + }, + { + name: "artifacts_namespaces_get", + title: "Get a namespace", + description: "Returns an Artifacts namespace summary.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "namespace": { + "description": "Artifacts namespace name.", + "type": "string" + } + }, + required: [ + "account_id", + "namespace" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get a namespace" + }, + method: "GET", + path: "/accounts/{account_id}/artifacts/namespaces/{namespace}", + extensions: { + "x-api-token-group": [ + "Artifacts Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces/${pathParam(args, "namespace")}`, + }), + }, + { + name: "artifacts_namespaces_list", + title: "List namespaces", + description: "Lists Artifacts namespaces for an account.\n\nThis method is beta.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Cloudflare account ID.", + "type": "string" + }, + "cursor": { + "type": "string" + }, + "limit": { + "default": 100, + "type": "integer" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List namespaces" + }, + method: "GET", + path: "/accounts/{account_id}/artifacts/namespaces", + extensions: { + "x-api-token-group": [ + "Artifacts Read" + ], + "x-stability": "beta" + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/artifacts/namespaces`, + query: [ + ["limit", args["limit"], true], + ["cursor", args["cursor"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/auditLogs/tools.ts b/src/generated/forge-mcp/auditLogs/tools.ts new file mode 100644 index 00000000..9d3dd2b0 --- /dev/null +++ b/src/generated/forge-mcp/auditLogs/tools.ts @@ -0,0 +1,137 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../_/tool.js"; + +/** + * The tools of `audit_logs`. + */ +export const tools: readonly Tool[] = [ + { + name: "audit_logs_list", + title: "Get account audit logs", + description: "Gets a list of audit logs for an account. Can be filtered by who made the change, on which zone, and the timeframe of the change.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "action_type": { + "description": "Filters by the action type.", + "type": "string" + }, + "actor_email": { + "description": "Filters by the email address of the actor that made the change.", + "type": "string" + }, + "actor_ip": { + "description": "Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range.", + "type": "string" + }, + "before": { + "oneOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + } + ] + }, + "direction": { + "default": "desc", + "description": "Changes the direction of the chronological sorting.", + "enum": [ + "desc", + "asc" + ], + "type": "string" + }, + "export": { + "description": "Indicates that this request is an export of logs in CSV format.", + "type": "boolean" + }, + "hide_user_logs": { + "default": false, + "description": "Indicates whether or not to hide user level audit logs.", + "type": "boolean" + }, + "id": { + "description": "Finds a specific log by its ID.", + "type": "string" + }, + "page": { + "default": 1, + "description": "Defines which page of results to return.", + "type": "number" + }, + "per_page": { + "default": 100, + "description": "Sets the number of results to return per page.", + "type": "number" + }, + "since": { + "oneOf": [ + { + "format": "date", + "type": "string" + }, + { + "format": "date-time", + "type": "string" + } + ] + }, + "zone_name": { + "description": "Filters by the name of the zone associated to the change.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get account audit logs" + }, + method: "GET", + path: "/accounts/{account_id}/audit_logs", + extensions: { + "x-api-token-group": [ + "Account Settings Write", + "Account Settings Read" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/audit_logs`, + query: [ + ["id", args["id"], true], + ["export", args["export"], true], + ["action.type", args["action_type"], true], + ["actor.ip", args["actor_ip"], true], + ["actor.email", args["actor_email"], true], + ["since", args["since"], true], + ["before", args["before"], true], + ["zone.name", args["zone_name"], true], + ["direction", args["direction"], true], + ["per_page", args["per_page"], true], + ["page", args["page"], true], + ["hide_user_logs", args["hide_user_logs"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/basinCatalog/credentials/tools.ts b/src/generated/forge-mcp/basinCatalog/credentials/tools.ts new file mode 100644 index 00000000..39717811 --- /dev/null +++ b/src/generated/forge-mcp/basinCatalog/credentials/tools.ts @@ -0,0 +1,98 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { r2_data_catalog_catalog_credential_request } from "../../schemas.js"; + +/** + * The tools of `basin_catalog.credentials`. + */ +export const tools: readonly Tool[] = [ + { + name: "basin_catalog_credentials_create", + title: "Store catalog credentials", + description: "Store authentication credentials for a catalog. These credentials are used\nto authenticate with R2 storage when performing catalog operations.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifies the account.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/r2-data-catalog_catalog-credential-request" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name.", + "type": "string" + } + }, + required: [ + "account_id", + "bucket_name", + "body" + ], + $defs: { + "r2-data-catalog_catalog-credential-request": r2_data_catalog_catalog_credential_request, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Store catalog credentials" + }, + method: "POST", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/credential", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/credential`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "basin_catalog_credentials_status", + title: "Get Basin Catalog credential status", + description: "Check whether the configured catalog credentials are valid, invalid,\nor absent by probing authentication against the catalog.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifies the account.", + "type": "string" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name.", + "type": "string" + } + }, + required: [ + "account_id", + "bucket_name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Basin Catalog credential status" + }, + method: "GET", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/credential/status", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write", + "Workers R2 Data Catalog Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/credential/status`, + }), + }, +]; diff --git a/src/generated/forge-mcp/basinCatalog/maintenanceConfigs/tools.ts b/src/generated/forge-mcp/basinCatalog/maintenanceConfigs/tools.ts new file mode 100644 index 00000000..601a594a --- /dev/null +++ b/src/generated/forge-mcp/basinCatalog/maintenanceConfigs/tools.ts @@ -0,0 +1,108 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { + r2_data_catalog_catalog_maintenance_state, + r2_data_catalog_catalog_maintenance_update_request, + r2_data_catalog_catalog_target_file_size, + r2_data_catalog_compaction_update_params, + r2_data_catalog_snapshot_expiration_update_params, +} from "../../schemas.js"; + +/** + * The tools of `basin_catalog.maintenance_configs`. + */ +export const tools: readonly Tool[] = [ + { + name: "basin_catalog_maintenance_configs_get", + title: "Get catalog maintenance configuration", + description: "Retrieve the maintenance configuration for a specific catalog,\nincluding compaction settings and credential status.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifies the account.", + "type": "string" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name.", + "type": "string" + } + }, + required: [ + "account_id", + "bucket_name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get catalog maintenance configuration" + }, + method: "GET", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/maintenance-configs", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write", + "Workers R2 Data Catalog Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/maintenance-configs`, + }), + }, + { + name: "basin_catalog_maintenance_configs_update", + title: "Update catalog maintenance configuration", + description: "Update the maintenance configuration for a catalog. This allows you to\nenable or disable compaction and adjust target file sizes for optimization.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifies the account.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/r2-data-catalog_catalog-maintenance-update-request" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name.", + "type": "string" + } + }, + required: [ + "account_id", + "bucket_name", + "body" + ], + $defs: { + "r2-data-catalog_catalog-maintenance-state": r2_data_catalog_catalog_maintenance_state, + "r2-data-catalog_catalog-maintenance-update-request": r2_data_catalog_catalog_maintenance_update_request, + "r2-data-catalog_catalog-target-file-size": r2_data_catalog_catalog_target_file_size, + "r2-data-catalog_compaction-update-params": r2_data_catalog_compaction_update_params, + "r2-data-catalog_snapshot-expiration-update-params": r2_data_catalog_snapshot_expiration_update_params, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update catalog maintenance configuration" + }, + method: "POST", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/maintenance-configs", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/maintenance-configs`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/basinCatalog/namespaces/tables/maintenanceConfigs/tools.ts b/src/generated/forge-mcp/basinCatalog/namespaces/tables/maintenanceConfigs/tools.ts new file mode 100644 index 00000000..310a6c5f --- /dev/null +++ b/src/generated/forge-mcp/basinCatalog/namespaces/tables/maintenanceConfigs/tools.ts @@ -0,0 +1,187 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; +import { + r2_data_catalog_catalog_maintenance_state, + r2_data_catalog_catalog_target_file_size, + r2_data_catalog_queue_maintenance_request, + r2_data_catalog_snapshot_expiration_update_params, + r2_data_catalog_table_compaction_update_params, + r2_data_catalog_table_maintenance_update_request, +} from "../../../../schemas.js"; + +/** + * The tools of `basin_catalog.namespaces.tables.maintenance_configs`. + */ +export const tools: readonly Tool[] = [ + { + name: "basin_catalog_namespaces_tables_maintenance_configs_get", + title: "Get table maintenance configuration", + description: "Retrieve the maintenance configuration for a specific table,\nincluding compaction settings.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifies the account.", + "type": "string" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name.", + "type": "string" + }, + "namespace": { + "description": "The namespace identifier (use %1F as separator for nested namespaces).", + "type": "string" + }, + "table_name": { + "description": "The table name.", + "type": "string" + } + }, + required: [ + "account_id", + "bucket_name", + "namespace", + "table_name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get table maintenance configuration" + }, + method: "GET", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write", + "Workers R2 Data Catalog Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/namespaces/${pathParam(args, "namespace")}/tables/${pathParam(args, "table_name")}/maintenance-configs`, + }), + }, + { + name: "basin_catalog_namespaces_tables_maintenance_configs_queue", + title: "Queue table maintenance", + description: "Queue maintenance for normal polling. This request does not start a run.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Use this to identify the account.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/r2-data-catalog_queue-maintenance-request" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name.", + "type": "string" + }, + "configuration_type": { + "enum": [ + "compaction", + "snapshot_expiration" + ], + "type": "string" + }, + "namespace": { + "type": "string" + }, + "table_name": { + "type": "string" + } + }, + required: [ + "account_id", + "bucket_name", + "namespace", + "table_name", + "configuration_type", + "body" + ], + $defs: { + "r2-data-catalog_queue-maintenance-request": r2_data_catalog_queue_maintenance_request, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Queue table maintenance" + }, + method: "POST", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs/{configuration_type}/queue", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/namespaces/${pathParam(args, "namespace")}/tables/${pathParam(args, "table_name")}/maintenance-configs/${pathParam(args, "configuration_type")}/queue`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "basin_catalog_namespaces_tables_maintenance_configs_update", + title: "Update table maintenance configuration", + description: "Update the maintenance configuration for a specific table. This allows you to\nenable or disable compaction and adjust target file sizes for optimization.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifies the account.", + "type": "string" + }, + "body": { + "$ref": "#/$defs/r2-data-catalog_table-maintenance-update-request" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name.", + "type": "string" + }, + "namespace": { + "description": "The namespace identifier (use %1F as separator for nested namespaces).", + "type": "string" + }, + "table_name": { + "description": "The table name.", + "type": "string" + } + }, + required: [ + "account_id", + "bucket_name", + "namespace", + "table_name", + "body" + ], + $defs: { + "r2-data-catalog_catalog-maintenance-state": r2_data_catalog_catalog_maintenance_state, + "r2-data-catalog_catalog-target-file-size": r2_data_catalog_catalog_target_file_size, + "r2-data-catalog_snapshot-expiration-update-params": r2_data_catalog_snapshot_expiration_update_params, + "r2-data-catalog_table-compaction-update-params": r2_data_catalog_table_compaction_update_params, + "r2-data-catalog_table-maintenance-update-request": r2_data_catalog_table_maintenance_update_request, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update table maintenance configuration" + }, + method: "POST", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/namespaces/${pathParam(args, "namespace")}/tables/${pathParam(args, "table_name")}/maintenance-configs`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/basinCatalog/namespaces/tables/maintenanceRuns/tools.ts b/src/generated/forge-mcp/basinCatalog/namespaces/tables/maintenanceRuns/tools.ts new file mode 100644 index 00000000..b5f4f6aa --- /dev/null +++ b/src/generated/forge-mcp/basinCatalog/namespaces/tables/maintenanceRuns/tools.ts @@ -0,0 +1,62 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../../_/tool.js"; + +/** + * The tools of `basin_catalog.namespaces.tables.maintenance_runs`. + */ +export const tools: readonly Tool[] = [ + { + name: "basin_catalog_namespaces_tables_maintenance_runs_list", + title: "List table maintenance runs", + description: "Retrieves recent table maintenance runs for the current table.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Use this to identify the account.", + "type": "string" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name.", + "type": "string" + }, + "namespace": { + "type": "string" + }, + "page_size": { + "type": "integer" + }, + "page_token": { + "type": "string" + }, + "table_name": { + "type": "string" + } + }, + required: [ + "account_id", + "bucket_name", + "namespace", + "table_name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List table maintenance runs" + }, + method: "GET", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-runs", + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/namespaces/${pathParam(args, "namespace")}/tables/${pathParam(args, "table_name")}/maintenance-runs`, + query: [ + ["page_size", args["page_size"], true], + ["page_token", args["page_token"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/basinCatalog/namespaces/tables/tools.ts b/src/generated/forge-mcp/basinCatalog/namespaces/tables/tools.ts new file mode 100644 index 00000000..c4399c03 --- /dev/null +++ b/src/generated/forge-mcp/basinCatalog/namespaces/tables/tools.ts @@ -0,0 +1,130 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `basin_catalog.namespaces.tables`. + */ +export const tools: readonly Tool[] = [ + { + name: "basin_catalog_namespaces_tables_get", + title: "Get table details", + description: "Returns full Apache Iceberg metadata for a single table: schema,\npartition specs, sort orders, properties, and recent snapshot history.\nDesigned for catalog introspection UIs that need per-table details\nwithout holding R2 credentials.\n\nThe `metadata.snapshots`, `metadata.snapshot-log`, and\n`metadata.metadata-log` arrays are pruned to the most recent 10\nentries by `timestamp-ms`. Use `total_snapshots` and\n`returned_snapshots` to surface the truncation to end users.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifies the account.", + "type": "string" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name.", + "type": "string" + }, + "namespace": { + "description": "The namespace identifier.\nFor nested namespaces, use %1F as separator (e.g., \"bronze%1Fanalytics\").\n", + "type": "string" + }, + "table_name": { + "description": "The table name within the given namespace.", + "type": "string" + } + }, + required: [ + "account_id", + "bucket_name", + "namespace", + "table_name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get table details" + }, + method: "GET", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write", + "Workers R2 Data Catalog Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/namespaces/${pathParam(args, "namespace")}/tables/${pathParam(args, "table_name")}`, + }), + }, + { + name: "basin_catalog_namespaces_tables_list", + title: "List tables in namespace", + description: "Returns a list of tables in the specified namespace within a Basin Catalog.\nSupports pagination for efficient traversal of large table collections.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifies the account.", + "type": "string" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name.", + "type": "string" + }, + "namespace": { + "description": "The namespace identifier.\nFor nested namespaces, use %1F as separator (e.g., \"bronze%1Fanalytics\").\n", + "type": "string" + }, + "page_size": { + "default": 100, + "description": "Maximum number of tables to return per page.\nDefaults to 100, maximum 1000.\n", + "type": "integer" + }, + "page_token": { + "description": "Opaque pagination token from a previous response.\nUse this to fetch the next page of results.\n", + "type": "string" + }, + "return_details": { + "default": false, + "description": "Whether to include additional metadata (timestamps, locations).\nWhen true, response includes created_at, updated_at, metadata_locations, and locations arrays.\n", + "type": "boolean" + }, + "return_uuids": { + "default": false, + "description": "Whether to include table UUIDs in the response.\nSet to true to receive the table_uuids array.\n", + "type": "boolean" + } + }, + required: [ + "account_id", + "bucket_name", + "namespace" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List tables in namespace" + }, + method: "GET", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/namespaces/{namespace}/tables", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write", + "Workers R2 Data Catalog Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/namespaces/${pathParam(args, "namespace")}/tables`, + query: [ + ["page_token", args["page_token"], true], + ["page_size", args["page_size"], true], + ["return_uuids", args["return_uuids"], true], + ["return_details", args["return_details"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/basinCatalog/namespaces/tools.ts b/src/generated/forge-mcp/basinCatalog/namespaces/tools.ts new file mode 100644 index 00000000..96231063 --- /dev/null +++ b/src/generated/forge-mcp/basinCatalog/namespaces/tools.ts @@ -0,0 +1,80 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `basin_catalog.namespaces`. + */ +export const tools: readonly Tool[] = [ + { + name: "basin_catalog_namespaces_list", + title: "List namespaces in catalog", + description: "Returns a list of namespaces in the specified Basin Catalog.\nSupports hierarchical filtering and pagination for efficient traversal\nof large namespace hierarchies.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifies the account.", + "type": "string" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name.", + "type": "string" + }, + "page_size": { + "default": 100, + "description": "Maximum number of namespaces to return per page.\nDefaults to 100, maximum 1000.\n", + "type": "integer" + }, + "page_token": { + "description": "Opaque pagination token from a previous response.\nUse this to fetch the next page of results.\n", + "type": "string" + }, + "parent": { + "description": "Parent namespace to filter by. Only returns direct children of this namespace.\nFor nested namespaces, use %1F as separator (e.g., \"bronze%1Fanalytics\").\nOmit this parameter to list top-level namespaces.\n", + "type": "string" + }, + "return_details": { + "default": false, + "description": "Whether to include additional metadata (timestamps).\nWhen true, response includes created_at and updated_at arrays.\n", + "type": "boolean" + }, + "return_uuids": { + "default": false, + "description": "Whether to include namespace UUIDs in the response.\nSet to true to receive the namespace_uuids array.\n", + "type": "boolean" + } + }, + required: [ + "account_id", + "bucket_name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List namespaces in catalog" + }, + method: "GET", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/namespaces", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write", + "Workers R2 Data Catalog Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/namespaces`, + query: [ + ["page_token", args["page_token"], true], + ["page_size", args["page_size"], true], + ["parent", args["parent"], true], + ["return_uuids", args["return_uuids"], true], + ["return_details", args["return_details"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/basinCatalog/tools.ts b/src/generated/forge-mcp/basinCatalog/tools.ts new file mode 100644 index 00000000..46b8a1cd --- /dev/null +++ b/src/generated/forge-mcp/basinCatalog/tools.ts @@ -0,0 +1,210 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../_/tool.js"; + +/** + * The tools of `basin_catalog`. + */ +export const tools: readonly Tool[] = [ + { + name: "basin_catalog_delete", + title: "Delete Basin Catalog metadata", + description: "Removes the catalog from the control plane without deleting R2 bucket objects.\nSet force=true to remove catalog namespaces, tables, views, and maintenance\nmetadata. Force deletion is limited to a configured catalog object count.\n\nConfirm with the user before calling this tool. This removes catalog metadata. R2 bucket objects are retained.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Use this to identify the account.", + "type": "string" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name.", + "type": "string" + }, + "cascade": { + "default": false, + "description": "Remove child metadata before deleting the catalog.", + "type": "boolean" + } + }, + required: [ + "account_id", + "bucket_name" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Basin Catalog metadata" + }, + method: "POST", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/delete", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/delete`, + query: [ + ["force", args["cascade"], true], + ], + }), + }, + { + name: "basin_catalog_disable", + title: "Disable Basin Catalog", + description: "Disable an R2 bucket as a catalog. This operation deactivates the catalog\nbut preserves existing metadata and data files. The catalog can be\nre-enabled later.\n\nConfirm with the user before calling this tool. This operation turns off the data catalog for the bucket. Existing namespace or table state remains, but writes stop.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifies the account.", + "type": "string" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name to disable as catalog.", + "type": "string" + } + }, + required: [ + "account_id", + "bucket_name" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Disable Basin Catalog" + }, + method: "POST", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/disable", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/disable`, + }), + }, + { + name: "basin_catalog_enable", + title: "Enable R2 bucket as a catalog", + description: "Enable an R2 bucket as an Apache Iceberg catalog. This operation creates\nthe necessary catalog infrastructure and activates the bucket for storing\nIceberg metadata and data files.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifies the account.", + "type": "string" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name to enable as catalog.", + "type": "string" + } + }, + required: [ + "account_id", + "bucket_name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Enable R2 bucket as a catalog" + }, + method: "POST", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}/enable", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}/enable`, + }), + }, + { + name: "basin_catalog_get", + title: "Get Basin Catalog details", + description: "Retrieve detailed information about a specific Basin Catalog by bucket name.\nReturns catalog status, maintenance configuration, and credential status.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifies the account.", + "type": "string" + }, + "bucket_name": { + "description": "Specifies the R2 bucket name.", + "type": "string" + } + }, + required: [ + "account_id", + "bucket_name" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Basin Catalog details" + }, + method: "GET", + path: "/accounts/{account_id}/basin-catalog/{bucket_name}", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write", + "Workers R2 Data Catalog Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog/${pathParam(args, "bucket_name")}`, + }), + }, + { + name: "basin_catalog_list", + title: "List Basin Catalogs", + description: "Returns a list of R2 buckets that have been enabled as Apache Iceberg catalogs\nfor the specified account. Each catalog represents an R2 bucket configured\nto store Iceberg metadata and data files.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifies the account.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Basin Catalogs" + }, + method: "GET", + path: "/accounts/{account_id}/basin-catalog", + extensions: { + "x-api-token-group": [ + "Workers R2 Data Catalog Write", + "Workers R2 Data Catalog Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/basin-catalog`, + }), + }, +]; diff --git a/src/generated/forge-mcp/billing/addresses/schemas.ts b/src/generated/forge-mcp/billing/addresses/schemas.ts new file mode 100644 index 00000000..8ed1c556 --- /dev/null +++ b/src/generated/forge-mcp/billing/addresses/schemas.ts @@ -0,0 +1,37 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `bill-subs-api_address_validation_request`. + */ +export const bill_subs_api_address_validation_request: JsonSchema = { + "properties": { + "address": { + "description": "Address line 1.", + "type": "string" + }, + "address2": { + "description": "Address line 2.", + "type": "string" + }, + "city": { + "description": "City.", + "type": "string" + }, + "country": { + "description": "Country code.", + "type": "string" + }, + "state": { + "description": "State or province.", + "type": "string" + }, + "zipcode": { + "description": "Postal or zip code.", + "type": "string" + } + }, + "type": "object" +}; diff --git a/src/generated/forge-mcp/billing/addresses/tools.ts b/src/generated/forge-mcp/billing/addresses/tools.ts new file mode 100644 index 00000000..d0ff95b0 --- /dev/null +++ b/src/generated/forge-mcp/billing/addresses/tools.ts @@ -0,0 +1,51 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { Tool } from "../../_/tool.js"; +import { bill_subs_api_address_validation_request } from "./schemas.js"; + +/** + * The tools of `billing.addresses`. + */ +export const tools: readonly Tool[] = [ + { + name: "billing_addresses_validate", + title: "Validate Billing Address", + description: "Validates a billing address and returns validated address suggestions. Authentication is not enforced to support pre-signup address validation flows, so credentials are accepted but not required.", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/bill-subs-api_address_validation_request" + } + }, + required: [ + "body" + ], + $defs: { + "bill-subs-api_address_validation_request": bill_subs_api_address_validation_request, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Validate Billing Address" + }, + method: "POST", + path: "/billing/address-validation", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/billing/address-validation`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/billing/profiles/schemas.ts b/src/generated/forge-mcp/billing/profiles/schemas.ts new file mode 100644 index 00000000..fe837ccb --- /dev/null +++ b/src/generated/forge-mcp/billing/profiles/schemas.ts @@ -0,0 +1,90 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `bill-subs-api_billing_profile_request`. + */ +export const bill_subs_api_billing_profile_request: JsonSchema = { + "description": "Request body for creating or updating a billing profile.", + "properties": { + "address": { + "description": "Street address line 1.", + "type": "string" + }, + "address2": { + "description": "Street address line 2 (apt, suite, etc.).", + "type": "string" + }, + "billing_email": { + "description": "Primary billing email address.", + "type": "string" + }, + "buying_rate_plan": { + "description": "Rate plan being purchased right after profile setup.", + "type": "string" + }, + "captcha_challenge_jwt": { + "description": "Captcha challenge JWT issued during onboarding.", + "type": "string" + }, + "cf_turnstile_response": { + "description": "Cloudflare Turnstile response.", + "type": "string" + }, + "city": { + "description": "City on the billing profile.", + "type": "string" + }, + "company": { + "description": "Company name on the billing profile.", + "type": "string" + }, + "country": { + "description": "ISO 3166-1 alpha-2 country code.", + "type": "string" + }, + "first_name": { + "description": "First name on the billing profile.", + "type": "string" + }, + "h_captcha_response": { + "description": "hCaptcha response.", + "type": "string" + }, + "last_name": { + "description": "Last name on the billing profile.", + "type": "string" + }, + "preferred_locale": { + "description": "Preferred locale for invoice rendering (BCP 47).", + "type": "string" + }, + "secondary_billing_email": { + "description": "Secondary billing email address for CC on invoices.", + "type": "string" + }, + "state": { + "description": "State or region on the billing profile.", + "type": "string" + }, + "tax_id_type": { + "description": "Type of tax ID provided.", + "type": "string" + }, + "telephone": { + "description": "Contact phone number.", + "type": "string" + }, + "vat": { + "description": "VAT identifier.", + "type": "string" + }, + "zipcode": { + "description": "ZIP or postal code.", + "type": "string" + } + }, + "type": "object" +}; diff --git a/src/generated/forge-mcp/billing/profiles/tools.ts b/src/generated/forge-mcp/billing/profiles/tools.ts new file mode 100644 index 00000000..571b8492 --- /dev/null +++ b/src/generated/forge-mcp/billing/profiles/tools.ts @@ -0,0 +1,346 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { bill_subs_api_billing_profile_request } from "./schemas.js"; + +/** + * The tools of `billing.profiles`. + */ +export const tools: readonly Tool[] = [ + { + name: "billing_profiles_create", + title: "Create Billing Profile", + description: "Creates a billing profile for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "body": { + "$ref": "#/$defs/bill-subs-api_billing_profile_request" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "bill-subs-api_billing_profile_request": bill_subs_api_billing_profile_request, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create Billing Profile" + }, + method: "POST", + path: "/accounts/{account_id}/billing/profile", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read", + "#billing:edit" + ], + "x-fern-enum": { + "#billing:edit": { + "name": "billing_edit" + }, + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billing/profile`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "billing_profiles_create_payment_intent", + title: "Create Payment Intent for Billing Profile", + description: "Creates a Stripe payment intent for adding or updating a payment method on the account's billing profile. Returns a client secret for frontend payment method collection.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create Payment Intent for Billing Profile" + }, + method: "POST", + path: "/accounts/{account_id}/billing/profile/payment-method", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billing/profile/payment-method`, + }), + }, + { + name: "billing_profiles_delete", + title: "Delete Billing Profile", + description: "Deletes the billing profile for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete Billing Profile" + }, + method: "DELETE", + path: "/accounts/{account_id}/billing/profile", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:edit" + ], + "x-fern-enum": { + "#billing:edit": { + "name": "billing_edit" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billing/profile`, + }), + }, + { + name: "billing_profiles_get", + title: "Get Billing Profile", + description: "Gets the current billing profile for the account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Billing Profile" + }, + method: "GET", + path: "/accounts/{account_id}/billing/profile", + extensions: { + "x-api-token-group": [ + "Billing Write", + "Billing Read" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read" + ], + "x-fern-enum": { + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billing/profile`, + }), + }, + { + name: "billing_profiles_update", + title: "Update Billing Profile", + description: "Updates the billing profile for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "body": { + "$ref": "#/$defs/bill-subs-api_billing_profile_request" + } + }, + required: [ + "account_id", + "body" + ], + $defs: { + "bill-subs-api_billing_profile_request": bill_subs_api_billing_profile_request, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update Billing Profile" + }, + method: "PUT", + path: "/accounts/{account_id}/billing/profile", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read", + "#billing:edit" + ], + "x-fern-enum": { + "#billing:edit": { + "name": "billing_edit" + }, + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billing/profile`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "billing_profiles_update_email", + title: "Update Billing Email", + description: "Updates the billing email addresses and preferred locale for an account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier", + "type": "string" + }, + "body": { + "properties": { + "billing_email": { + "type": "string" + }, + "preferred_locale": { + "type": "string" + }, + "secondary_billing_email": { + "type": "string" + } + }, + "type": "object" + } + }, + required: [ + "account_id", + "body" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update Billing Email" + }, + method: "PATCH", + path: "/accounts/{account_id}/billing/profile", + extensions: { + "x-api-token-group": [ + "Billing Write" + ], + "x-cfPermissionsRequired": { + "enum": [ + "#billing:read", + "#billing:edit" + ], + "x-fern-enum": { + "#billing:edit": { + "name": "billing_edit" + }, + "#billing:read": { + "name": "billing_read" + } + } + }, + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billing/profile`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/billing/ratePlans/tools.ts b/src/generated/forge-mcp/billing/ratePlans/tools.ts new file mode 100644 index 00000000..9365a1e2 --- /dev/null +++ b/src/generated/forge-mcp/billing/ratePlans/tools.ts @@ -0,0 +1,47 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `billing.rate_plans`. + */ +export const tools: readonly Tool[] = [ + { + name: "billing_rate_plans_get", + title: "Get Rate Plan by Public Key", + description: "Gets a rate plan's details by its public key (e.g., 'teams_free', 'cf_pro_20_20'). This is a public catalog endpoint, so authentication is not enforced and credentials are accepted but not required.", + inputSchema: { + type: "object", + properties: { + "public_key": { + "description": "The public key identifier for the rate plan.", + "type": "string" + } + }, + required: [ + "public_key" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Rate Plan by Public Key" + }, + method: "GET", + path: "/billing/rate_plans/{public_key}", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/billing/rate_plans/${pathParam(args, "public_key")}`, + }), + }, +]; diff --git a/src/generated/forge-mcp/billing/usage/schemas.ts b/src/generated/forge-mcp/billing/usage/schemas.ts new file mode 100644 index 00000000..7cb27d92 --- /dev/null +++ b/src/generated/forge-mcp/billing/usage/schemas.ts @@ -0,0 +1,155 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `billable-usage-api_v2_filter_by`. + */ +export const billable_usage_api_v2_filter_by: JsonSchema = { + "description": "Usage filters. Filters of different kinds are combined with AND, so a record must match every filter present to be returned.", + "properties": { + "BillableMetricIds": { + "description": "Restrict results to rows whose `x_BillableMetricId` matches one of these billable metric ids (e.g. `workers_standard_requests`). Values must be unique.", + "items": { + "type": "string" + }, + "maxItems": 20, + "type": "array" + }, + "ProductFamilyIds": { + "description": "Restrict results to billable metrics belonging to these product families. Values must be unique UUIDs.", + "items": { + "format": "uuid", + "type": "string" + }, + "maxItems": 10, + "type": "array" + }, + "Tags": { + "description": "Restrict results by resource tags. Filters for different keys are combined with AND, while values within one filter are combined with OR. Keys must be unique and are case-sensitive.", + "items": { + "$ref": "#/$defs/billable-usage-api_v2_tag_filter" + }, + "maxItems": 10, + "type": "array" + } + }, + "type": "object" +}; + +/** + * The schema of `billable-usage-api_v2_group_by`. + */ +export const billable_usage_api_v2_group_by: JsonSchema = { + "description": "A definition used to split result rows. TAG groups by a case-sensitive resource-tag key. DIMENSION groups by a usage dimension key — account_id, zone_id and region are the documented keys, and any other dimension key carried by the usage data is accepted and returned under that same key.", + "properties": { + "Key": { + "description": "Case-sensitive resource-tag key (for TAG) or dimension key (for DIMENSION), e.g. team, region, account_id or zone_id.", + "type": "string" + }, + "Type": { + "description": "Group category.", + "enum": [ + "TAG", + "DIMENSION" + ], + "type": "string" + } + }, + "required": [ + "Key", + "Type" + ], + "type": "object" +}; + +/** + * The schema of `billable-usage-api_v2_tag_filter`. + */ +export const billable_usage_api_v2_tag_filter: JsonSchema = { + "description": "Values accepted for one resource-tag key.", + "properties": { + "Key": { + "description": "Case-sensitive resource-tag key.", + "type": "string" + }, + "Values": { + "description": "Tag values to match. Values are combined with OR and must be unique. An empty string matches a key-only tag.", + "items": { + "type": "string" + }, + "maxItems": 20, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "Key", + "Values" + ], + "type": "object" +}; + +/** + * The schema of `billable-usage-api_v2_time_period`. + */ +export const billable_usage_api_v2_time_period: JsonSchema = { + "description": "Charge period to query, i.e. when consumption happened, not when it was billed. `From` is inclusive and `To` is exclusive. `From` and `To` must be supplied together; supplying one without the other is an error. When both are omitted the range defaults to the start of the current month through today.", + "properties": { + "From": { + "description": "Start of the range (ISO 8601). Required if `To` is set.", + "format": "date-time", + "type": "string" + }, + "To": { + "description": "End of the range (ISO 8601). Required if `From` is set. Must be after `From` and no more than 31 days after it.", + "format": "date-time", + "type": "string" + } + }, + "type": "object" +}; + +/** + * The schema of `billable-usage-api_v2_usage_query`. + */ +export const billable_usage_api_v2_usage_query: JsonSchema = { + "description": "Filter criteria for a usage query. Every field is optional; an empty object is equivalent to omitting the body entirely. Unknown fields are rejected.", + "properties": { + "FilterBy": { + "$ref": "#/$defs/billable-usage-api_v2_filter_by", + "description": "Usage filters. Filters of different kinds are combined with AND, so a record must match every filter present to be returned." + }, + "GroupBy": { + "description": "Grouping definitions used to split result rows. At most two unique keys may be supplied.", + "items": { + "$ref": "#/$defs/billable-usage-api_v2_group_by" + }, + "maxItems": 2, + "type": "array" + }, + "Metric": { + "default": "usage", + "description": "Type of cost/usage records to retrieve. `usage` returns unrated usage quantities. `cost` returns rated usage with cost and pricing fields; it is available only on `POST` account usage and only when the underlying usage data source is ClickHouse (other sources return an empty result set). Requests that combine `cost` with `GroupBy` or `FilterBy.Tags` return HTTP 400. Unrelated to `FilterBy.BillableMetricIds`. Defaults to `usage` when omitted.", + "enum": [ + "usage", + "cost" + ], + "type": "string" + }, + "TimePeriod": { + "$ref": "#/$defs/billable-usage-api_v2_time_period", + "description": "Charge period to query, i.e. when consumption happened, not when it was billed. `From` is inclusive and `To` is exclusive. `From` and `To` must be supplied together; supplying one without the other is an error. When both are omitted the range defaults to the start of the current month through today." + } + }, + "type": "object" +}; + +/** + * The schema of `usage-analytics_identifier`. + */ +export const usage_analytics_identifier: JsonSchema = { + "description": "Cloudflare resource identifier.", + "type": "string" +}; diff --git a/src/generated/forge-mcp/billing/usage/tools.ts b/src/generated/forge-mcp/billing/usage/tools.ts new file mode 100644 index 00000000..9af3e2e0 --- /dev/null +++ b/src/generated/forge-mcp/billing/usage/tools.ts @@ -0,0 +1,351 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { billable_usage_api_identifier } from "../../schemas.js"; +import { + billable_usage_api_v2_filter_by, + billable_usage_api_v2_group_by, + billable_usage_api_v2_tag_filter, + billable_usage_api_v2_time_period, + billable_usage_api_v2_usage_query, + usage_analytics_identifier, +} from "./schemas.js"; + +/** + * The tools of `billing.usage`. + */ +export const tools: readonly Tool[] = [ + { + name: "billing_usage_get", + title: "Get account billing usage", + description: "Retrieve billing usage analytics for an account. Returns time-series data for all billable product metrics including Stream, Media (Images), Rate Limiting, Load Balancing, Argo, Workers, Workers KV, Image Resizing, and Spectrum.\n\nThis method is deprecated.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/usage-analytics_identifier", + "description": "Standard Cloudflare hex account identifier. The API gateway translates this to an internal numeric ID before forwarding to the backend service.\n" + }, + "filters": { + "description": "Filter expressions to apply to the query. Format: field==value. Multiple filters can be combined.\n", + "type": "string" + }, + "limit": { + "default": 100, + "description": "Maximum number of data points to return. The actual number of results depends on the interaction between the time range (since/until) and time_delta granularity. Results are truncated to this limit without error if the time range produces more data points than the limit allows.\n", + "type": "integer" + }, + "metrics": { + "description": "Comma-separated list of metrics to include in the response. Available metrics depend on the endpoint. Billing usage supports: streamMinutesViewed, rateLimitingRequestsAllowed, loadBalancingQueries, argoAcceleratedBytes, workersRequests, workersKVReads, imageResizingRequests, spectrumBytesTransferred, mediaUniqueTransformations. Stream/media usage supports: streamMinutesViewed.\n", + "type": "string" + }, + "since": { + "description": "Start of the time range for the query (inclusive). ISO 8601 timestamp. Defaults to 6 hours before the current time.\n", + "format": "date-time", + "type": "string" + }, + "time_delta": { + "default": "hour", + "description": "Time unit to aggregate usage observations into. Data retention is approximately 18 months. The effective number of data points returned depends on the time range and granularity selected. For example, requesting hourly granularity over 18 months could produce up to ~13,000 data points; use the limit parameter to cap results and be aware that responses may be truncated.\n", + "enum": [ + "hour", + "day", + "week", + "month", + "quarter", + "year" + ], + "type": "string" + }, + "until": { + "description": "End of the time range for the query (inclusive). ISO 8601 timestamp. Defaults to the current time.\n", + "format": "date-time", + "type": "string" + } + }, + required: [ + "account_id" + ], + $defs: { + "usage-analytics_identifier": usage_analytics_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get account billing usage" + }, + method: "GET", + path: "/accounts/{account_id}/billing/usage", + extensions: { + "x-api-token-group": [ + "Billing Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billing/usage`, + query: [ + ["metrics", args["metrics"], true], + ["since", args["since"], true], + ["until", args["until"], true], + ["time_delta", args["time_delta"], true], + ["limit", args["limit"], true], + ["filters", args["filters"], true], + ], + }), + }, + { + name: "billing_usage_get_account_billable_metrics", + title: "List Account Billable Metrics (Version 2, Alpha, Restricted)", + description: "Lists billable metrics available to the account through contracts and\nsubscriptions that overlap the requested period. Results are\ndeduplicated and ordered. If no qualifying contract exists, the\nresult is an empty array.\n\nWhen `from` and `to` are omitted, the period defaults to the start of\nthe current month through today. The maximum date range is 31 days.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/billable-usage-api_identifier", + "description": "Identifies the Cloudflare account." + }, + "from": { + "description": "Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days.", + "format": "date", + "type": "string" + }, + "to": { + "description": "End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days.", + "format": "date", + "type": "string" + } + }, + required: [ + "account_id" + ], + $defs: { + "billable-usage-api_identifier": billable_usage_api_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List Account Billable Metrics (Version 2, Alpha, Restricted)" + }, + method: "GET", + path: "/accounts/{account_id}/billable/usage/billable-metrics", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billable/usage/billable-metrics`, + query: [ + ["from", args["from"], true], + ["to", args["to"], true], + ], + }), + }, + { + name: "billing_usage_get_account_usage_v2", + title: "Get Account Usage (Version 2, Alpha, Restricted)", + description: "Returns cost and usage data for a single Cloudflare account, aligned\nwith the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/)\nCost and Usage dataset specification.\n\nEach record represents one billable metric for one account on one day.\nThis includes all metered usage, including usage that falls within\nfree-tier allowances and may result in zero cost.\n\n**Note:** This endpoint serves `usage` records only; cost and pricing\nfields are absent from responses. To retrieve rated costs, use `POST`\non the same path with `Metric: cost`.\n\nWhen `from` and `to` are omitted, defaults to the start of the current\nmonth through today. The maximum date range is 31 days.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/billable-usage-api_identifier", + "description": "Identifies the Cloudflare account." + }, + "from": { + "description": "Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days.", + "format": "date", + "type": "string" + }, + "to": { + "description": "End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days.", + "format": "date", + "type": "string" + } + }, + required: [ + "account_id" + ], + $defs: { + "billable-usage-api_identifier": billable_usage_api_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Account Usage (Version 2, Alpha, Restricted)" + }, + method: "GET", + path: "/accounts/{account_id}/billable/usage", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billable/usage`, + query: [ + ["from", args["from"], true], + ["to", args["to"], true], + ], + }), + }, + { + name: "billing_usage_get_info_v1", + title: "Get Account Billable Usage Info (Version 1, Alpha)", + description: "Returns high-level usage information for the account, including coverage,\nand subscription metadata.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/billable-usage-api_identifier", + "description": "Identifies the Cloudflare account." + } + }, + required: [ + "account_id" + ], + $defs: { + "billable-usage-api_identifier": billable_usage_api_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Account Billable Usage Info (Version 1, Alpha)" + }, + method: "GET", + path: "/accounts/{account_id}/billable-usage/info", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": false, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billable-usage/info`, + }), + }, + { + name: "billing_usage_get_v1", + title: "Get Account Billable Usage (Version 1, Alpha)", + description: "Returns billable usage data for the account.\nWhen no query parameters are provided, returns usage for the current\nbilling period.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/billable-usage-api_identifier", + "description": "Identifies the Cloudflare account." + }, + "from": { + "description": "Start date for the usage query (ISO 8601). The provided time range must include the subscription billing cycle anchor day, otherwise no usage data is returned. Use the info endpoint to retrieve the subscription anchor day.", + "format": "date", + "type": "string" + }, + "to": { + "description": "End date for the usage query (ISO 8601).", + "format": "date", + "type": "string" + } + }, + required: [ + "account_id" + ], + $defs: { + "billable-usage-api_identifier": billable_usage_api_identifier, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Account Billable Usage (Version 1, Alpha)" + }, + method: "GET", + path: "/accounts/{account_id}/billable-usage", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": false, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billable-usage`, + query: [ + ["from", args["from"], true], + ["to", args["to"], true], + ], + }), + }, + { + name: "billing_usage_query", + title: "Query Account Usage (Version 2, Alpha, Restricted)", + description: "Returns cost and usage data for a single Cloudflare account, aligned\nwith the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/)\nCost and Usage dataset specification.\n\nThis is the filterable counterpart to `GET` on the same path. It is a\nread-only operation and requires only the `#billing:read` permission;\n`POST` is used so that filter criteria can be supplied in a request body\nrather than in the query string.\n\nEach record represents one billable metric for one account on one day.\nThis includes all metered usage, including usage that falls within\nfree-tier allowances and may result in zero cost.\n\n**Note:** Cost and pricing fields are populated only when `Metric`\nis `cost`; otherwise they are absent from responses.\n\nThe request body is optional. When it is omitted, or when `TimePeriod`\nis omitted, the range defaults to the start of the current month through\ntoday. The maximum date range is 31 days.\n\nFilters of different kinds are combined with AND. Values within one tag\nfilter are combined with OR. Filter values that do not match usage\nproduce an empty result set.\n\nResults can be grouped by up to two groups, in any combination of\ndimension keys and resource-tag keys. Tag groups are returned in the\n`Tags` field. Usage without a requested tag remains in an untagged\ngroup, with that key omitted from `Tags`.\n\nRequests that use tag filtering or tag grouping return HTTP 400 when the\nunderlying usage data source does not support tags.\n\nRequests that use dimension grouping return HTTP 400 when the\nunderlying usage data source does not support dimensions.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "$ref": "#/$defs/billable-usage-api_identifier", + "description": "Identifies the Cloudflare account." + }, + "body": { + "$ref": "#/$defs/billable-usage-api_v2_usage_query" + } + }, + required: [ + "account_id" + ], + $defs: { + "billable-usage-api_identifier": billable_usage_api_identifier, + "billable-usage-api_v2_filter_by": billable_usage_api_v2_filter_by, + "billable-usage-api_v2_group_by": billable_usage_api_v2_group_by, + "billable-usage-api_v2_tag_filter": billable_usage_api_v2_tag_filter, + "billable-usage-api_v2_time_period": billable_usage_api_v2_time_period, + "billable-usage-api_v2_usage_query": billable_usage_api_v2_usage_query, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Query Account Usage (Version 2, Alpha, Restricted)" + }, + method: "POST", + path: "/accounts/{account_id}/billable/usage", + extensions: { + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/billable/usage`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/botManagement/feedback/schemas.ts b/src/generated/forge-mcp/botManagement/feedback/schemas.ts new file mode 100644 index 00000000..3851d67e --- /dev/null +++ b/src/generated/forge-mcp/botManagement/feedback/schemas.ts @@ -0,0 +1,128 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `bot-management_feedback_report`. + */ +export const bot_management_feedback_report: JsonSchema = { + "properties": { + "description": { + "type": "string" + }, + "expression": { + "description": "Wirefilter expression describing the traffic being reported.", + "type": "string" + }, + "first_request_seen_at": { + "format": "date-time", + "type": "string" + }, + "last_request_seen_at": { + "format": "date-time", + "type": "string" + }, + "requests": { + "type": "integer" + }, + "requests_by_attribute": { + "$ref": "#/$defs/bot-management_requests_by_attribute", + "description": "Top attributes contributing to the feedback sample. Keys include topASNs, topCountries, topHosts, topIPs, topJA3Hashes, topJA4s, topPaths, topUserAgents." + }, + "requests_by_score": { + "$ref": "#/$defs/bot-management_requests_by_score", + "description": "Map of bot scores (1-99) to request counts. Sum must equal `requests`." + }, + "requests_by_score_src": { + "$ref": "#/$defs/bot-management_requests_by_score_src", + "description": "Map of score source to request counts. Sum must equal `requests`." + }, + "subtype": { + "type": "string" + }, + "type": { + "$ref": "#/$defs/bot-management_feedback_type", + "description": "Type of feedback report." + } + }, + "required": [ + "description", + "expression", + "first_request_seen_at", + "last_request_seen_at", + "requests", + "requests_by_attribute", + "requests_by_score", + "requests_by_score_src", + "type" + ], + "type": "object" +}; + +/** + * The schema of `bot-management_feedback_type`. + */ +export const bot_management_feedback_type: JsonSchema = { + "description": "Type of feedback report.", + "enum": [ + "false_positive", + "false_negative" + ], + "type": "string" +}; + +/** + * The schema of `bot-management_metric_requests`. + */ +export const bot_management_metric_requests: JsonSchema = { + "properties": { + "metric": { + "type": "string" + }, + "requests": { + "type": "integer" + } + }, + "required": [ + "metric", + "requests" + ], + "type": "object" +}; + +/** + * The schema of `bot-management_requests_by_attribute`. + */ +export const bot_management_requests_by_attribute: JsonSchema = { + "additionalProperties": { + "items": { + "$ref": "#/$defs/bot-management_metric_requests" + }, + "type": "array" + }, + "description": "Top attributes contributing to the feedback sample. Keys include topASNs, topCountries, topHosts, topIPs, topJA3Hashes, topJA4s, topPaths, topUserAgents.", + "type": "object" +}; + +/** + * The schema of `bot-management_requests_by_score`. + */ +export const bot_management_requests_by_score: JsonSchema = { + "additionalProperties": { + "type": "integer" + }, + "description": "Map of bot scores (1-99) to request counts. Sum must equal `requests`.", + "type": "object" +}; + +/** + * The schema of `bot-management_requests_by_score_src`. + */ +export const bot_management_requests_by_score_src: JsonSchema = { + "additionalProperties": { + "type": "integer" + }, + "description": "Map of score source to request counts. Sum must equal `requests`.", + "type": "object" +}; diff --git a/src/generated/forge-mcp/botManagement/feedback/tools.ts b/src/generated/forge-mcp/botManagement/feedback/tools.ts new file mode 100644 index 00000000..7cd46443 --- /dev/null +++ b/src/generated/forge-mcp/botManagement/feedback/tools.ts @@ -0,0 +1,117 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { + bot_management_feedback_report, + bot_management_feedback_type, + bot_management_metric_requests, + bot_management_requests_by_attribute, + bot_management_requests_by_score, + bot_management_requests_by_score_src, +} from "./schemas.js"; + +/** + * The tools of `bot_management.feedback`. + */ +export const tools: readonly Tool[] = [ + { + name: "bot_management_feedback_create", + title: "Submit a feedback report", + description: "Submit a feedback report for the specified zone. Use `type` to indicate whether the report is a false positive (good traffic flagged as bot) or a false negative (bot traffic missed). Furthermore, you can also use `expression` as a wirefilter to identify the affected traffic sample.\n\nSee more accepted API fields and expression types at https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields and https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, respectively.", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/bot-management_feedback_report" + }, + "zone_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "bot-management_feedback_report": bot_management_feedback_report, + "bot-management_feedback_type": bot_management_feedback_type, + "bot-management_metric_requests": bot_management_metric_requests, + "bot-management_requests_by_attribute": bot_management_requests_by_attribute, + "bot-management_requests_by_score": bot_management_requests_by_score, + "bot-management_requests_by_score_src": bot_management_requests_by_score_src, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Submit a feedback report" + }, + method: "POST", + path: "/zones/{zone_id}/bot_management/feedback", + extensions: { + "x-api-token-group": [ + "Bot Management Feedback Report Write", + "Bot Management Feedback Report Read", + "Bot Management Write", + "Bot Management Read" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": false, + "pro": false + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/bot_management/feedback`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "bot_management_feedback_list", + title: "List zone feedback reports", + description: "Returns all feedback reports previously submitted for the specified zone. Feedback reports help improve detection by sharing samples of traffic that were misclassified as bots or humans.", + inputSchema: { + type: "object", + properties: { + "zone_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "zone_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List zone feedback reports" + }, + method: "GET", + path: "/zones/{zone_id}/bot_management/feedback", + extensions: { + "x-api-token-group": [ + "Bot Management Feedback Report Write", + "Bot Management Feedback Report Read", + "Bot Management Write", + "Bot Management Read" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": false, + "pro": false + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/bot_management/feedback`, + }), + }, +]; diff --git a/src/generated/forge-mcp/botManagement/schemas.ts b/src/generated/forge-mcp/botManagement/schemas.ts new file mode 100644 index 00000000..702a887f --- /dev/null +++ b/src/generated/forge-mcp/botManagement/schemas.ts @@ -0,0 +1,420 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../_/tool.js"; + +/** + * The schema of `bot-management_ai_bots_migration_opt_out`. + */ +export const bot_management_ai_bots_migration_opt_out: JsonSchema = { + "description": "Temporary migration flag tracking zones opted out of AI bots managed-rule updates.", + "type": "boolean" +}; + +/** + * The schema of `bot-management_ai_bots_protection`. + */ +export const bot_management_ai_bots_protection: JsonSchema = { + "description": "Enable rule to block AI Scrapers and Crawlers.", + "enum": [ + "block", + "disabled", + "only_on_ad_pages" + ], + "type": "string" +}; + +/** + * The schema of `bot-management_ai_search`. + */ +export const bot_management_ai_search: JsonSchema = { + "description": "Configure robots.txt policy for AI search bots.", + "enum": [ + "disabled", + "block", + "only_on_ad_pages" + ], + "type": "string" +}; + +/** + * The schema of `bot-management_ai_training`. + */ +export const bot_management_ai_training: JsonSchema = { + "description": "Configure robots.txt policy for AI model training bots.", + "enum": [ + "disabled", + "disallow", + "block", + "only_on_ad_pages" + ], + "type": "string" +}; + +/** + * The schema of `bot-management_ai_user`. + */ +export const bot_management_ai_user: JsonSchema = { + "description": "Configure robots.txt policy for AI assistant and agent bots.", + "enum": [ + "disabled", + "block", + "only_on_ad_pages" + ], + "type": "string" +}; + +/** + * The schema of `bot-management_auto_update_model`. + */ +export const bot_management_auto_update_model: JsonSchema = { + "description": "Automatically update to the newest bot detection models created by Cloudflare as they are released. [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)", + "type": "boolean" +}; + +/** + * The schema of `bot-management_base_config`. + */ +export const bot_management_base_config: JsonSchema = { + "description": "Shared Config", + "properties": { + "ai_bots_migration_opt_out": { + "$ref": "#/$defs/bot-management_ai_bots_migration_opt_out", + "default": false, + "description": "Temporary migration flag tracking zones opted out of AI bots managed-rule updates." + }, + "ai_bots_protection": { + "$ref": "#/$defs/bot-management_ai_bots_protection", + "description": "Enable rule to block AI Scrapers and Crawlers." + }, + "ai_search": { + "$ref": "#/$defs/bot-management_ai_search", + "description": "Configure robots.txt policy for AI search bots." + }, + "ai_training": { + "$ref": "#/$defs/bot-management_ai_training", + "description": "Configure robots.txt policy for AI model training bots." + }, + "ai_user": { + "$ref": "#/$defs/bot-management_ai_user", + "description": "Configure robots.txt policy for AI assistant and agent bots." + }, + "bot_preference_sync_enabled": { + "$ref": "#/$defs/bot-management_bot_preference_sync_enabled", + "default": false, + "description": "Enable Bot Preference Sync for this zone. When enabled, Cloudflare can serve robots.txt content derived from the zone's AI Search, AI User, and AI Training preferences." + }, + "cf_robots_variant": { + "$ref": "#/$defs/bot-management_cf_robots_variant", + "description": "Specifies the Robots Access Control License variant to use." + }, + "content_bots_protection": { + "$ref": "#/$defs/bot-management_content_bots_protection", + "description": "Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules." + }, + "crawler_protection": { + "$ref": "#/$defs/bot-management_crawler_protection", + "description": "Enable rule to punish AI Scrapers and Crawlers via a link maze." + }, + "enable_js": { + "$ref": "#/$defs/bot-management_enable_js", + "description": "Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/)." + }, + "is_robots_txt_managed": { + "$ref": "#/$defs/bot-management_is_robots_txt_managed", + "default": false, + "description": "Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt." + }, + "jsd_api_results_enabled": { + "$ref": "#/$defs/bot-management_jsd_api_results_enabled", + "description": "Whether to use JavaScript Detection results submitted through the API for this zone." + } + }, + "type": "object" +}; + +/** + * The schema of `bot-management_bm_cookie_enabled`. + */ +export const bot_management_bm_cookie_enabled: JsonSchema = { + "description": "Indicates that the bot management cookie can be placed on end user devices accessing the site. Defaults to true", + "type": "boolean" +}; + +/** + * The schema of `bot-management_bm_subscription_config`. + */ +export const bot_management_bm_subscription_config: JsonSchema = { + "allOf": [ + { + "$ref": "#/$defs/bot-management_base_config" + }, + { + "properties": { + "auto_update_model": { + "$ref": "#/$defs/bot-management_auto_update_model", + "description": "Automatically update to the newest bot detection models created by Cloudflare as they are released. [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)" + }, + "bm_cookie_enabled": { + "$ref": "#/$defs/bot-management_bm_cookie_enabled", + "description": "Indicates that the bot management cookie can be placed on end user devices accessing the site. Defaults to true" + }, + "suppress_session_score": { + "$ref": "#/$defs/bot-management_suppress_session_score", + "description": "Whether to disable tracking the highest bot score for a session in the Bot Management cookie." + } + }, + "type": "object" + } + ], + "description": "BM Enterprise Subscription" +}; + +/** + * The schema of `bot-management_bot_fight_mode_config`. + */ +export const bot_management_bot_fight_mode_config: JsonSchema = { + "allOf": [ + { + "$ref": "#/$defs/bot-management_base_config" + }, + { + "properties": { + "fight_mode": { + "$ref": "#/$defs/bot-management_fight_mode", + "description": "Whether to enable Bot Fight Mode." + } + }, + "type": "object" + } + ], + "description": "Bot Fight Mode" +}; + +/** + * The schema of `bot-management_bot_preference_sync_enabled`. + */ +export const bot_management_bot_preference_sync_enabled: JsonSchema = { + "description": "Enable Bot Preference Sync for this zone. When enabled, Cloudflare can serve robots.txt content derived from the zone's AI Search, AI User, and AI Training preferences.", + "type": "boolean" +}; + +/** + * The schema of `bot-management_cf_robots_variant`. + */ +export const bot_management_cf_robots_variant: JsonSchema = { + "description": "Specifies the Robots Access Control License variant to use.", + "enum": [ + "off", + "policy_only" + ], + "type": "string" +}; + +/** + * The schema of `bot-management_config_single`. + */ +export const bot_management_config_single: JsonSchema = { + "oneOf": [ + { + "$ref": "#/$defs/bot-management_bot_fight_mode_config" + }, + { + "$ref": "#/$defs/bot-management_sbfm_definitely_config" + }, + { + "$ref": "#/$defs/bot-management_sbfm_likely_config" + }, + { + "$ref": "#/$defs/bot-management_bm_subscription_config" + } + ] +}; + +/** + * The schema of `bot-management_content_bots_protection`. + */ +export const bot_management_content_bots_protection: JsonSchema = { + "description": "Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules.", + "enum": [ + "block", + "disabled" + ], + "type": "string" +}; + +/** + * The schema of `bot-management_crawler_protection`. + */ +export const bot_management_crawler_protection: JsonSchema = { + "description": "Enable rule to punish AI Scrapers and Crawlers via a link maze.", + "enum": [ + "enabled", + "disabled" + ], + "type": "string" +}; + +/** + * The schema of `bot-management_enable_js`. + */ +export const bot_management_enable_js: JsonSchema = { + "description": "Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).", + "type": "boolean" +}; + +/** + * The schema of `bot-management_fight_mode`. + */ +export const bot_management_fight_mode: JsonSchema = { + "description": "Whether to enable Bot Fight Mode.", + "type": "boolean" +}; + +/** + * The schema of `bot-management_is_robots_txt_managed`. + */ +export const bot_management_is_robots_txt_managed: JsonSchema = { + "description": "Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt.", + "type": "boolean" +}; + +/** + * The schema of `bot-management_jsd_api_results_enabled`. + */ +export const bot_management_jsd_api_results_enabled: JsonSchema = { + "description": "Whether to use JavaScript Detection results submitted through the API for this zone.", + "type": "boolean" +}; + +/** + * The schema of `bot-management_optimize_wordpress`. + */ +export const bot_management_optimize_wordpress: JsonSchema = { + "description": "Whether to optimize Super Bot Fight Mode protections for Wordpress.", + "type": "boolean" +}; + +/** + * The schema of `bot-management_sbfm_definitely_automated`. + */ +export const bot_management_sbfm_definitely_automated: JsonSchema = { + "description": "Super Bot Fight Mode (SBFM) action to take on definitely automated requests.", + "enum": [ + "allow", + "block", + "managed_challenge" + ], + "type": "string" +}; + +/** + * The schema of `bot-management_sbfm_definitely_config`. + */ +export const bot_management_sbfm_definitely_config: JsonSchema = { + "allOf": [ + { + "$ref": "#/$defs/bot-management_base_config" + }, + { + "properties": { + "optimize_wordpress": { + "$ref": "#/$defs/bot-management_optimize_wordpress", + "description": "Whether to optimize Super Bot Fight Mode protections for Wordpress." + }, + "sbfm_definitely_automated": { + "$ref": "#/$defs/bot-management_sbfm_definitely_automated", + "description": "Super Bot Fight Mode (SBFM) action to take on definitely automated requests." + }, + "sbfm_static_resource_protection": { + "$ref": "#/$defs/bot-management_sbfm_static_resource_protection", + "description": "Super Bot Fight Mode (SBFM) to enable static resource protection.\nEnable if static resources on your application need bot protection.\nNote: Static resource protection can also result in legitimate traffic being blocked.\n" + }, + "sbfm_verified_bots": { + "$ref": "#/$defs/bot-management_sbfm_verified_bots", + "description": "Super Bot Fight Mode (SBFM) action to take on verified bots requests." + } + }, + "type": "object" + } + ], + "description": "SBFM Pro Plan" +}; + +/** + * The schema of `bot-management_sbfm_likely_automated`. + */ +export const bot_management_sbfm_likely_automated: JsonSchema = { + "description": "Super Bot Fight Mode (SBFM) action to take on likely automated requests.", + "enum": [ + "allow", + "block", + "managed_challenge" + ], + "type": "string" +}; + +/** + * The schema of `bot-management_sbfm_likely_config`. + */ +export const bot_management_sbfm_likely_config: JsonSchema = { + "allOf": [ + { + "$ref": "#/$defs/bot-management_base_config" + }, + { + "properties": { + "optimize_wordpress": { + "$ref": "#/$defs/bot-management_optimize_wordpress", + "description": "Whether to optimize Super Bot Fight Mode protections for Wordpress." + }, + "sbfm_definitely_automated": { + "$ref": "#/$defs/bot-management_sbfm_definitely_automated", + "description": "Super Bot Fight Mode (SBFM) action to take on definitely automated requests." + }, + "sbfm_likely_automated": { + "$ref": "#/$defs/bot-management_sbfm_likely_automated", + "description": "Super Bot Fight Mode (SBFM) action to take on likely automated requests." + }, + "sbfm_static_resource_protection": { + "$ref": "#/$defs/bot-management_sbfm_static_resource_protection", + "description": "Super Bot Fight Mode (SBFM) to enable static resource protection.\nEnable if static resources on your application need bot protection.\nNote: Static resource protection can also result in legitimate traffic being blocked.\n" + }, + "sbfm_verified_bots": { + "$ref": "#/$defs/bot-management_sbfm_verified_bots", + "description": "Super Bot Fight Mode (SBFM) action to take on verified bots requests." + } + }, + "type": "object" + } + ], + "description": "SBFM Biz Plan" +}; + +/** + * The schema of `bot-management_sbfm_static_resource_protection`. + */ +export const bot_management_sbfm_static_resource_protection: JsonSchema = { + "description": "Super Bot Fight Mode (SBFM) to enable static resource protection.\nEnable if static resources on your application need bot protection.\nNote: Static resource protection can also result in legitimate traffic being blocked.\n", + "type": "boolean" +}; + +/** + * The schema of `bot-management_sbfm_verified_bots`. + */ +export const bot_management_sbfm_verified_bots: JsonSchema = { + "description": "Super Bot Fight Mode (SBFM) action to take on verified bots requests.", + "enum": [ + "allow", + "block" + ], + "type": "string" +}; + +/** + * The schema of `bot-management_suppress_session_score`. + */ +export const bot_management_suppress_session_score: JsonSchema = { + "description": "Whether to disable tracking the highest bot score for a session in the Bot Management cookie.", + "type": "boolean" +}; diff --git a/src/generated/forge-mcp/botManagement/tools.ts b/src/generated/forge-mcp/botManagement/tools.ts new file mode 100644 index 00000000..d0ad2940 --- /dev/null +++ b/src/generated/forge-mcp/botManagement/tools.ts @@ -0,0 +1,154 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../_/tool.js"; +import { + bot_management_ai_bots_migration_opt_out, + bot_management_ai_bots_protection, + bot_management_ai_search, + bot_management_ai_training, + bot_management_ai_user, + bot_management_auto_update_model, + bot_management_base_config, + bot_management_bm_cookie_enabled, + bot_management_bm_subscription_config, + bot_management_bot_fight_mode_config, + bot_management_bot_preference_sync_enabled, + bot_management_cf_robots_variant, + bot_management_config_single, + bot_management_content_bots_protection, + bot_management_crawler_protection, + bot_management_enable_js, + bot_management_fight_mode, + bot_management_is_robots_txt_managed, + bot_management_jsd_api_results_enabled, + bot_management_optimize_wordpress, + bot_management_sbfm_definitely_automated, + bot_management_sbfm_definitely_config, + bot_management_sbfm_likely_automated, + bot_management_sbfm_likely_config, + bot_management_sbfm_static_resource_protection, + bot_management_sbfm_verified_bots, + bot_management_suppress_session_score, +} from "./schemas.js"; + +/** + * The tools of `bot_management`. + */ +export const tools: readonly Tool[] = [ + { + name: "bot_management_get", + title: "Get Zone Bot Management Config", + description: "Retrieve a zone's Bot Management Config", + inputSchema: { + type: "object", + properties: { + "zone_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "zone_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get Zone Bot Management Config" + }, + method: "GET", + path: "/zones/{zone_id}/bot_management", + extensions: { + "x-api-token-group": [ + "Bot Management Write", + "Bot Management Read" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/bot_management`, + }), + }, + { + name: "bot_management_update", + title: "Update Zone Bot Management Config", + description: "Updates the Bot Management configuration for a zone.\n\nThis API is used to update:\n- **Bot Fight Mode**\n- **Super Bot Fight Mode**\n- **Bot Management for Enterprise**\n\nSee [Bot Plans](https://developers.cloudflare.com/bots/plans/) for more information on the different plans\n\\\nIf you recently upgraded or downgraded your plan, refer to the following examples to clean up old configurations.\nCopy and paste the example body to remove old zone configurations based on your current plan.\n#### Clean up configuration for Bot Fight Mode plan\n```json\n{\n \"sbfm_likely_automated\": \"allow\",\n \"sbfm_definitely_automated\": \"allow\",\n \"sbfm_verified_bots\": \"allow\",\n \"sbfm_static_resource_protection\": false,\n \"optimize_wordpress\": false,\n \"suppress_session_score\": false\n}\n```\n#### Clean up configuration for SBFM Pro plan\n```json\n{\n \"sbfm_likely_automated\": \"allow\",\n \"fight_mode\": false\n}\n```\n#### Clean up configuration for SBFM Biz plan\n```json\n{\n \"fight_mode\": false\n}\n```\n#### Clean up configuration for BM Enterprise Subscription plan\nIt is strongly recommended that you ensure you have [custom rules](https://developers.cloudflare.com/waf/custom-rules/) in place to protect your zone before disabling the SBFM rules. Without these protections, your zone is vulnerable to attacks.\n```json\n{\n \"sbfm_likely_automated\": \"allow\",\n \"sbfm_definitely_automated\": \"allow\",\n \"sbfm_verified_bots\": \"allow\",\n \"sbfm_static_resource_protection\": false,\n \"optimize_wordpress\": false,\n \"fight_mode\": false\n}\n```", + inputSchema: { + type: "object", + properties: { + "body": { + "$ref": "#/$defs/bot-management_config_single" + }, + "zone_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "zone_id", + "body" + ], + $defs: { + "bot-management_ai_bots_migration_opt_out": bot_management_ai_bots_migration_opt_out, + "bot-management_ai_bots_protection": bot_management_ai_bots_protection, + "bot-management_ai_search": bot_management_ai_search, + "bot-management_ai_training": bot_management_ai_training, + "bot-management_ai_user": bot_management_ai_user, + "bot-management_auto_update_model": bot_management_auto_update_model, + "bot-management_base_config": bot_management_base_config, + "bot-management_bm_cookie_enabled": bot_management_bm_cookie_enabled, + "bot-management_bm_subscription_config": bot_management_bm_subscription_config, + "bot-management_bot_fight_mode_config": bot_management_bot_fight_mode_config, + "bot-management_bot_preference_sync_enabled": bot_management_bot_preference_sync_enabled, + "bot-management_cf_robots_variant": bot_management_cf_robots_variant, + "bot-management_config_single": bot_management_config_single, + "bot-management_content_bots_protection": bot_management_content_bots_protection, + "bot-management_crawler_protection": bot_management_crawler_protection, + "bot-management_enable_js": bot_management_enable_js, + "bot-management_fight_mode": bot_management_fight_mode, + "bot-management_is_robots_txt_managed": bot_management_is_robots_txt_managed, + "bot-management_jsd_api_results_enabled": bot_management_jsd_api_results_enabled, + "bot-management_optimize_wordpress": bot_management_optimize_wordpress, + "bot-management_sbfm_definitely_automated": bot_management_sbfm_definitely_automated, + "bot-management_sbfm_definitely_config": bot_management_sbfm_definitely_config, + "bot-management_sbfm_likely_automated": bot_management_sbfm_likely_automated, + "bot-management_sbfm_likely_config": bot_management_sbfm_likely_config, + "bot-management_sbfm_static_resource_protection": bot_management_sbfm_static_resource_protection, + "bot-management_sbfm_verified_bots": bot_management_sbfm_verified_bots, + "bot-management_suppress_session_score": bot_management_suppress_session_score, + }, + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Update Zone Bot Management Config" + }, + method: "PUT", + path: "/zones/{zone_id}/bot_management", + extensions: { + "x-api-token-group": [ + "Bot Management Write" + ], + "x-cfPlanAvailability": { + "business": true, + "enterprise": true, + "free": true, + "pro": true + } + }, + request: (args) => ({ + path: `/zones/${pathParam(args, "zone_id")}/bot_management`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/botnetFeed/asn/schemas.ts b/src/generated/forge-mcp/botnetFeed/asn/schemas.ts new file mode 100644 index 00000000..71459cc2 --- /dev/null +++ b/src/generated/forge-mcp/botnetFeed/asn/schemas.ts @@ -0,0 +1,12 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import type { JsonSchema } from "../../_/tool.js"; + +/** + * The schema of `dos_timestamp`. + */ +export const dos_timestamp: JsonSchema = { + "format": "date-time", + "type": "string" +}; diff --git a/src/generated/forge-mcp/botnetFeed/asn/tools.ts b/src/generated/forge-mcp/botnetFeed/asn/tools.ts new file mode 100644 index 00000000..6e1950a2 --- /dev/null +++ b/src/generated/forge-mcp/botnetFeed/asn/tools.ts @@ -0,0 +1,98 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; +import { dos_timestamp } from "./schemas.js"; + +/** + * The tools of `botnet_feed.asn`. + */ +export const tools: readonly Tool[] = [ + { + name: "botnet_feed_asn_day_report", + title: "Get daily report", + description: "Gets all the data the botnet tracking database has for a given ASN registered to user account for given date. If no date is given, it will return results for the previous day.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier.", + "type": "string" + }, + "asn_id": { + "type": "string" + }, + "date": { + "$ref": "#/$defs/dos_timestamp" + } + }, + required: [ + "account_id", + "asn_id" + ], + $defs: { + "dos_timestamp": dos_timestamp, + }, + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get daily report" + }, + method: "GET", + path: "/accounts/{account_id}/botnet_feed/asn/{asn_id}/day_report", + extensions: { + "x-api-token-group": [ + "DDoS Botnet Feed Write", + "DDoS Botnet Feed Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/botnet_feed/asn/${pathParam(args, "asn_id")}/day_report`, + query: [ + ["date", args["date"], true], + ], + }), + }, + { + name: "botnet_feed_asn_full_report", + title: "Get full report", + description: "Gets all the data the botnet threat feed tracking database has for a given ASN registered to user account.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier.", + "type": "string" + }, + "asn_id": { + "type": "string" + } + }, + required: [ + "account_id", + "asn_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get full report" + }, + method: "GET", + path: "/accounts/{account_id}/botnet_feed/asn/{asn_id}/full_report", + extensions: { + "x-api-token-group": [ + "DDoS Botnet Feed Write", + "DDoS Botnet Feed Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/botnet_feed/asn/${pathParam(args, "asn_id")}/full_report`, + }), + }, +]; diff --git a/src/generated/forge-mcp/botnetFeed/configs/asn/tools.ts b/src/generated/forge-mcp/botnetFeed/configs/asn/tools.ts new file mode 100644 index 00000000..f8d5740b --- /dev/null +++ b/src/generated/forge-mcp/botnetFeed/configs/asn/tools.ts @@ -0,0 +1,83 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../../_/tool.js"; + +/** + * The tools of `botnet_feed.configs.asn`. + */ +export const tools: readonly Tool[] = [ + { + name: "botnet_feed_configs_asn_delete", + title: "Delete an ASN", + description: "Delete an ASN from botnet threat feed for a given user.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier.", + "type": "string" + }, + "asn_id": { + "type": "string" + } + }, + required: [ + "account_id", + "asn_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete an ASN" + }, + method: "DELETE", + path: "/accounts/{account_id}/botnet_feed/configs/asn/{asn_id}", + extensions: { + "x-api-token-group": [ + "DDoS Botnet Feed Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/botnet_feed/configs/asn/${pathParam(args, "asn_id")}`, + }), + }, + { + name: "botnet_feed_configs_asn_get", + title: "Get list of ASNs", + description: "Gets a list of all ASNs registered for a user for the DDoS Botnet Feed API.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Identifier.", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get list of ASNs" + }, + method: "GET", + path: "/accounts/{account_id}/botnet_feed/configs/asn", + extensions: { + "x-api-token-group": [ + "DDoS Botnet Feed Write", + "DDoS Botnet Feed Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/botnet_feed/configs/asn`, + }), + }, +]; diff --git a/src/generated/forge-mcp/brandProtection/logoMatches/tools.ts b/src/generated/forge-mcp/brandProtection/logoMatches/tools.ts new file mode 100644 index 00000000..57658c7f --- /dev/null +++ b/src/generated/forge-mcp/brandProtection/logoMatches/tools.ts @@ -0,0 +1,85 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `brand_protection.logo_matches`. + */ +export const tools: readonly Tool[] = [ + { + name: "brand_protection_logo_matches_get", + title: "List logo matches", + description: "Get paginated list of logo matches for a specific brand protection logo query", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "download": { + "type": "string" + }, + "limit": { + "default": "50", + "type": "string" + }, + "offset": { + "default": "0", + "type": "string" + }, + "order": { + "description": "Sort order. Options: 'asc' (ascending) or 'desc' (descending)", + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "order_by": { + "description": "Column to sort by. Options: 'matchedAt', 'domain', 'similarityScore', or 'registrar'", + "enum": [ + "matchedAt", + "domain", + "similarityScore", + "registrar" + ], + "type": "string" + }, + "query_id": { + "type": "string" + } + }, + required: [ + "account_id", + "query_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List logo matches" + }, + method: "GET", + path: "/accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/matches", + extensions: { + "x-api-token-group": [ + "Cloudforce One Write", + "Cloudforce One Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/cloudforce-one/v2/brand-protection/logo/matches`, + query: [ + ["offset", args["offset"], true], + ["limit", args["limit"], true], + ["query_id", args["query_id"], true], + ["download", args["download"], true], + ["orderBy", args["order_by"], true], + ["order", args["order"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/brandProtection/logos/tools.ts b/src/generated/forge-mcp/brandProtection/logos/tools.ts new file mode 100644 index 00000000..6e014302 --- /dev/null +++ b/src/generated/forge-mcp/brandProtection/logos/tools.ts @@ -0,0 +1,154 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `brand_protection.logos`. + */ +export const tools: readonly Tool[] = [ + { + name: "brand_protection_logos_create", + title: "Insert logo query", + description: "Create a new saved brand protection logo query for visual similarity matching", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "image_data": { + "description": "Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string.", + "type": "string" + }, + "search_lookback": { + "default": true, + "description": "If true, search historic scanned images for matches above the similarity threshold", + "type": "boolean" + }, + "similarity_threshold": { + "description": "Minimum similarity score (0-1) required for visual matches", + "type": "number" + }, + "tag": { + "description": "Unique identifier for the logo query", + "type": "string" + } + }, + "required": [ + "image_data", + "similarity_threshold", + "tag" + ], + "type": "object" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Insert logo query" + }, + method: "POST", + path: "/accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/queries", + extensions: { + "x-api-token-group": [ + "Cloudforce One Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/cloudforce-one/v2/brand-protection/logo/queries`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "brand_protection_logos_delete", + title: "Delete logo query", + description: "Delete a saved brand protection logo query. Returns 404 if the query ID doesn't exist.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "query_id": { + "type": "string" + } + }, + required: [ + "account_id", + "query_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete logo query" + }, + method: "DELETE", + path: "/accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/queries/{query_id}", + extensions: { + "x-api-token-group": [ + "Cloudforce One Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/cloudforce-one/v2/brand-protection/logo/queries/${pathParam(args, "query_id")}`, + }), + }, + { + name: "brand_protection_logos_get", + title: "Get logo queries", + description: "Get all saved brand protection logo queries for an account. Optionally specify id to get a single query. Set download=true to include base64-encoded image data.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "download": { + "description": "If true, include base64-encoded image data in the response", + "type": "string" + }, + "id": { + "description": "Optional query ID to retrieve a specific logo query", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get logo queries" + }, + method: "GET", + path: "/accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/queries", + extensions: { + "x-api-token-group": [ + "Cloudforce One Write", + "Cloudforce One Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/cloudforce-one/v2/brand-protection/logo/queries`, + query: [ + ["id", args["id"], true], + ["download", args["download"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/brandProtection/matches/tools.ts b/src/generated/forge-mcp/brandProtection/matches/tools.ts new file mode 100644 index 00000000..73132da6 --- /dev/null +++ b/src/generated/forge-mcp/brandProtection/matches/tools.ts @@ -0,0 +1,174 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `brand_protection.matches`. + */ +export const tools: readonly Tool[] = [ + { + name: "brand_protection_matches_bulk_dismiss", + title: "Bulk dismiss or undismiss matches", + description: "Dismiss or undismiss multiple matches in a single request. Accepts either the new format (matches: [{query_id, domain_id}]) for per-query control, or the legacy format (match_ids: [number]) which dismisses for all queries sharing each match's hash. Returns per-item success/error results.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "action": { + "enum": [ + "dismiss", + "undismiss" + ], + "type": "string" + }, + "match_ids": { + "items": { + "type": "integer" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + }, + "matches": { + "items": { + "properties": { + "domain_id": { + "type": "integer" + }, + "query_id": { + "type": "integer" + } + }, + "required": [ + "domain_id", + "query_id" + ], + "type": "object" + }, + "maxItems": 100, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "action" + ], + "type": "object" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Bulk dismiss or undismiss matches" + }, + method: "POST", + path: "/accounts/{account_id}/cloudforce-one/v2/brand-protection/domain/matches/bulk-dismiss", + extensions: { + "x-api-token-group": [ + "Cloudforce One Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/cloudforce-one/v2/brand-protection/domain/matches/bulk-dismiss`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "brand_protection_matches_get", + title: "List saved query matches", + description: "Get paginated list of domain matches for one or more brand protection queries. When multiple query_ids are provided (comma-separated), matches are deduplicated across queries and each match includes a match_details array with per-match query metadata and individual dismissed state.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "domain_search": { + "description": "Filter matches by domain name (substring match)", + "type": "string" + }, + "include_dismissed": { + "type": "string" + }, + "include_domain_id": { + "type": "string" + }, + "limit": { + "default": "50", + "type": "string" + }, + "offset": { + "default": "0", + "type": "string" + }, + "order": { + "description": "Sort order. Options: 'asc' (ascending) or 'desc' (descending)", + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + "order_by": { + "description": "Column to sort by. Options: 'domain', 'first_seen', or 'registrar'", + "enum": [ + "domain", + "first_seen", + "registrar" + ], + "type": "string" + }, + "query_id": { + "description": "Query ID or comma-separated list of Query IDs. When multiple IDs are provided, matches are deduplicated across queries and each match includes a match_details array with per-match query metadata and dismissed state.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + required: [ + "account_id", + "query_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "List saved query matches" + }, + method: "GET", + path: "/accounts/{account_id}/cloudforce-one/v2/brand-protection/domain/matches", + extensions: { + "x-api-token-group": [ + "Cloudforce One Write", + "Cloudforce One Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/cloudforce-one/v2/brand-protection/domain/matches`, + query: [ + ["offset", args["offset"], true], + ["limit", args["limit"], true], + ["query_id", args["query_id"], true], + ["include_domain_id", args["include_domain_id"], true], + ["include_dismissed", args["include_dismissed"], true], + ["domain_search", args["domain_search"], true], + ["orderBy", args["order_by"], true], + ["order", args["order"], true], + ], + }), + }, +]; diff --git a/src/generated/forge-mcp/brandProtection/queries/tools.ts b/src/generated/forge-mcp/brandProtection/queries/tools.ts new file mode 100644 index 00000000..cbc1df5c --- /dev/null +++ b/src/generated/forge-mcp/brandProtection/queries/tools.ts @@ -0,0 +1,142 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `brand_protection.queries`. + */ +export const tools: readonly Tool[] = [ + { + name: "brand_protection_queries_dismiss", + title: "Dismiss a match", + description: "Mark a specific domain as dismissed for a given query. Dismissals are per-query — dismissing a domain in one query does not affect other queries.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "domain_id": { + "type": "string" + }, + "query_id": { + "type": "string" + } + }, + required: [ + "account_id", + "query_id", + "domain_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Dismiss a match" + }, + method: "POST", + path: "/accounts/{account_id}/cloudforce-one/v2/brand-protection/queries/{query_id}/matches/{domain_id}/dismiss", + extensions: { + "x-api-token-group": [ + "Cloudforce One Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/cloudforce-one/v2/brand-protection/queries/${pathParam(args, "query_id")}/matches/${pathParam(args, "domain_id")}/dismiss`, + }), + }, + { + name: "brand_protection_queries_get", + title: "Get queries", + description: "Get all saved brand protection queries for an account", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "page": { + "description": "Optional page number for paginated list requests. Defaults to 1 when only per_page is supplied. Omit page and per_page to preserve the legacy full-list response.", + "type": "integer" + }, + "per_page": { + "description": "Optional number of queries per page for paginated list requests. Defaults to 100 when only page is supplied. Maximum 100. Omit page and per_page to preserve the legacy full-list response.", + "type": "integer" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get queries" + }, + method: "GET", + path: "/accounts/{account_id}/cloudforce-one/v2/brand-protection/domain/queries", + extensions: { + "x-api-token-group": [ + "Cloudforce One Write", + "Cloudforce One Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/cloudforce-one/v2/brand-protection/domain/queries`, + query: [ + ["id", args["id"], true], + ["page", args["page"], true], + ["per_page", args["per_page"], true], + ], + }), + }, + { + name: "brand_protection_queries_undismiss", + title: "Undismiss a match", + description: "Remove the dismissed status from a specific domain for a given query. Undismissals are per-query — undismissing a domain in one query does not affect other queries.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "domain_id": { + "type": "string" + }, + "query_id": { + "type": "string" + } + }, + required: [ + "account_id", + "query_id", + "domain_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Undismiss a match" + }, + method: "POST", + path: "/accounts/{account_id}/cloudforce-one/v2/brand-protection/queries/{query_id}/matches/{domain_id}/undismiss", + extensions: { + "x-api-token-group": [ + "Cloudforce One Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/cloudforce-one/v2/brand-protection/queries/${pathParam(args, "query_id")}/matches/${pathParam(args, "domain_id")}/undismiss`, + }), + }, +]; diff --git a/src/generated/forge-mcp/brandProtection/tools.ts b/src/generated/forge-mcp/brandProtection/tools.ts new file mode 100644 index 00000000..5ffe9280 --- /dev/null +++ b/src/generated/forge-mcp/brandProtection/tools.ts @@ -0,0 +1,112 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../_/tool.js"; + +/** + * The tools of `brand_protection`. + */ +export const tools: readonly Tool[] = [ + { + name: "brand_protection_submit", + title: "Search scanned images", + description: "Submit an image and find the n closest matches from the scanned images index without creating any match records. Returns similarity scores and metadata for each match.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "image_data": { + "description": "Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string.", + "type": "string" + }, + "score_threshold": { + "default": 0, + "description": "Minimum similarity score threshold for matches (0-1, default: 0)", + "type": "number" + }, + "top_k": { + "default": 10, + "description": "Number of closest matches to return (1-100, default: 10)", + "type": "integer" + } + }, + "required": [ + "image_data" + ], + "type": "object" + }, + "download": { + "description": "If true, include base64-encoded image data in the response", + "type": "string" + }, + "show_historic": { + "description": "Include scanned images without domain metadata (historic data). Default: false (only show images with domain)", + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Search scanned images" + }, + method: "POST", + path: "/accounts/{account_id}/cloudforce-one/v2/brand-protection/logo/search", + extensions: { + "x-api-token-group": [ + "Cloudforce One Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/cloudforce-one/v2/brand-protection/logo/search`, + query: [ + ["showHistoric", args["show_historic"], true], + ["download", args["download"], true], + ], + body: { value: args["body"], mediaType: "application/json" }, + }), + }, + { + name: "brand_protection_url_info", + title: "Get total queries", + description: "Get the total number of saved brand protection queries (domain + logo) for an account", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Get total queries" + }, + method: "GET", + path: "/accounts/{account_id}/cloudforce-one/v2/brand-protection/total-queries", + extensions: { + "x-api-token-group": [ + "Cloudforce One Write", + "Cloudforce One Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/cloudforce-one/v2/brand-protection/total-queries`, + }), + }, +]; diff --git a/src/generated/forge-mcp/brandProtection/trial/tools.ts b/src/generated/forge-mcp/brandProtection/trial/tools.ts new file mode 100644 index 00000000..967291a3 --- /dev/null +++ b/src/generated/forge-mcp/brandProtection/trial/tools.ts @@ -0,0 +1,55 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `brand_protection.trial`. + */ +export const tools: readonly Tool[] = [ + { + name: "brand_protection_trial_create", + title: "Analyze domains for brand impersonation", + description: "Uses AI to scan all domains in the lookback table and identify potential phishing or impersonation attempts against the given brand string.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + }, + "body": { + "properties": { + "brand": { + "type": "string" + } + }, + "required": [ + "brand" + ], + "type": "object" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Analyze domains for brand impersonation" + }, + method: "POST", + path: "/accounts/{account_id}/cloudforce-one/v2/brand-protection/domain/trial", + extensions: { + "x-api-token-group": [ + "Cloudforce One Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/cloudforce-one/v2/brand-protection/domain/trial`, + body: { value: args["body"], mediaType: "application/json" }, + }), + }, +]; diff --git a/src/generated/forge-mcp/brands/patterns/tools.ts b/src/generated/forge-mcp/brands/patterns/tools.ts new file mode 100644 index 00000000..956cf4f2 --- /dev/null +++ b/src/generated/forge-mcp/brands/patterns/tools.ts @@ -0,0 +1,110 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `brands.patterns`. + */ +export const tools: readonly Tool[] = [ + { + name: "brands_patterns_create", + title: "Create new patterns for brands by ID", + description: "Return a success message after creating new patterns for brands by ID", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create new patterns for brands by ID" + }, + method: "POST", + path: "/accounts/{account_id}/brand-protection/brands/patterns", + extensions: { + "x-api-token-group": [ + "Intel Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/brand-protection/brands/patterns`, + }), + }, + { + name: "brands_patterns_delete", + title: "Delete patterns for brands by ID", + description: "Return a success message after deleting patterns for brands by ID", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete patterns for brands by ID" + }, + method: "DELETE", + path: "/accounts/{account_id}/brand-protection/brands/patterns", + extensions: { + "x-api-token-group": [ + "Intel Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/brand-protection/brands/patterns`, + }), + }, + { + name: "brands_patterns_get", + title: "Read patterns for brands by ID", + description: "Return patterns for brands based on ID", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Read patterns for brands by ID" + }, + method: "GET", + path: "/accounts/{account_id}/brand-protection/brands/patterns", + extensions: { + "x-api-token-group": [ + "Intel Write", + "Intel Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/brand-protection/brands/patterns`, + }), + }, +]; diff --git a/src/generated/forge-mcp/brands/tools.ts b/src/generated/forge-mcp/brands/tools.ts new file mode 100644 index 00000000..43648861 --- /dev/null +++ b/src/generated/forge-mcp/brands/tools.ts @@ -0,0 +1,110 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../_/tool.js"; + +/** + * The tools of `brands`. + */ +export const tools: readonly Tool[] = [ + { + name: "brands_create", + title: "Create new brands", + description: "Return new brands", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": false, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Create new brands" + }, + method: "POST", + path: "/accounts/{account_id}/brand-protection/brands", + extensions: { + "x-api-token-group": [ + "Intel Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/brand-protection/brands`, + }), + }, + { + name: "brands_delete", + title: "Delete brands by ID", + description: "Return a success message after deleting brands by ID", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": true, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": false, + "title": "Delete brands by ID" + }, + method: "DELETE", + path: "/accounts/{account_id}/brand-protection/brands", + extensions: { + "x-api-token-group": [ + "Intel Write" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/brand-protection/brands`, + }), + }, + { + name: "brands_get", + title: "Read all brands", + description: "Return all brands", + inputSchema: { + type: "object", + properties: { + "account_id": { + "type": "string" + } + }, + required: [ + "account_id" + ], + }, + annotations: { + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": true, + "readOnlyHint": true, + "title": "Read all brands" + }, + method: "GET", + path: "/accounts/{account_id}/brand-protection/brands", + extensions: { + "x-api-token-group": [ + "Intel Write", + "Intel Read" + ] + }, + request: (args) => ({ + path: `/accounts/${pathParam(args, "account_id")}/brand-protection/brands`, + }), + }, +]; diff --git a/src/generated/forge-mcp/browserRun/crawl/tools.ts b/src/generated/forge-mcp/browserRun/crawl/tools.ts new file mode 100644 index 00000000..5cfcd17f --- /dev/null +++ b/src/generated/forge-mcp/browserRun/crawl/tools.ts @@ -0,0 +1,900 @@ +// Code generated by forge. DO NOT EDIT. +/* eslint-disable */ + +import { type Tool, pathParam } from "../../_/tool.js"; + +/** + * The tools of `browser_run.crawl`. + */ +export const tools: readonly Tool[] = [ + { + name: "browser_run_crawl_create", + title: "Crawl websites.", + description: "Starts a crawl job for the provided URL and its children. Check available options like `gotoOptions` and `waitFor*` to control page load behaviour.", + inputSchema: { + type: "object", + properties: { + "account_id": { + "description": "Account ID.", + "type": "string" + }, + "body": { + "anyOf": [ + { + "properties": { + "actionTimeout": { + "description": "The maximum duration allowed for the browser action to complete after the page has loaded (such as taking screenshots, extracting content, or generating PDFs). If this time limit is exceeded, the action stops and returns a timeout error.", + "type": "number" + }, + "addScriptTag": { + "description": "Adds a script element into the page with the desired URL or content.", + "items": { + "properties": { + "content": { + "type": "string" + }, + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "addStyleTag": { + "description": "Adds a `` tag into the page with the desired URL or a `