Repository navigation
feat(generator): direct tools cover every non-deprecated operation OAuth can call - #269
Open
mattzcarey wants to merge 1 commit into
Open
mattzcarey wants to merge 1 commit into
mattzcarey wants to merge 1 commit into
Conversation
…uth can call; Forge fixes as overlays The cf CLI's selection dropped GA operations tagged sdk-only (cron triggers, Workers account settings, assets upload) and everything x-fern-ignore. Direct tools now include every non-deprecated operation an OAuth connection can call: OAuth scopes share permission names, with an alias table for Forge's stale labels. spec.json and tool entries carry the canonical names, so refusal explanations and scope challenges find the scope. Deprecated operations stay out: they duplicate their replacements' names and Code Mode still reaches them. Name collisions keep the cf command's name and give the others a readable path-based name. scripts/generator/overlays holds an OpenAPI Overlay 1.0 of targeted fixes to Forge's document, applied before generation; a stale target fails the build. It starts with two schema bugs real responses exposed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
?codemode=falsefollowed thecfCLI's selection, which drops operations an MCP connection should have: GA endpoints taggedsdk-only (cron triggers, Workers account settings, assets upload) and everything markedx-fern-ignore. Direct tools now include every non-deprecated operation an OAuth connection can call: 2,903 → 3,125 tools.Which operations OAuth can call. Forge has no OAuth marker, but OAuth scopes share API token permission names. An operation is in when any permission in its
x-api-token-grouphas an OAuth scope (scripts/generator/oauth.ts).sdk-only,x-fern-ignorex-api-token-group(e.g.GET /accounts)assets_jwt,pages_upload_tokensecuritydeprecatedBrowser Rendering Read→Browser Run Read,Artifacts Edit→Artifacts Write,Zone Zone Read→Zone Read, …).PERMISSION_ALIASESmaps them.spec.jsonand each tool'spermissionscarry the canonical names, so fix(api): explain why Cloudflare refused a request #267's explanations and feat(auth): ask for a missing OAuth scope with a 403 insufficient_scope challenge #268's challenges find the scope.cfcommand's name and gives the others a readable path-based name. A hash is only a last resort, and none is needed today. 45 names are longer than 64 characters.scripts/generator/overlays/mcp.overlay.jsonis an OpenAPI Overlay 1.0 of targeted fixes to Forge's document, applied before generation by a small applier (overlay.ts; no new dependency). A target that matches nothing fails the build, so a fix that Forge has absorbed gets removed rather than left stale. It starts with two schema bugs that real responses exposed:iam_account_settings.abuse_contact_email→ nullable (GET /accountsreturnsnull)iam_organization.id→ plain string (GET /userreturns"0", not a 32-character ID)Note
Codex refuses any server with more than 2,048 tools (#262).
?codemode=falsewas already over that limit with thecfselection. Code Mode is unaffected.Forge findings, including the label table: https://gist.github.com/mattzcarey/52b3e08c64a5b4101a3a02f24387665b