Skip to content

Prepare MCP tools for ChatGPT app submission - #205

Merged
mattzcarey merged 1 commit into
cloudflare:mainfrom
acoyfellow:jcoeyman/chatgpt-submission-hints
Sep 4, 2026
Merged

Prepare MCP tools for ChatGPT app submission#205
mattzcarey merged 1 commit into
cloudflare:mainfrom
acoyfellow:jcoeyman/chatgpt-submission-hints

Conversation

@acoyfellow

Copy link
Copy Markdown
Contributor

Summary

  • add explicit ChatGPT submission annotations to the default Code Mode tools
  • disclose the execute tool's read, create, update, and delete capabilities
  • add annotation contract tests
  • generate chatgpt-app-submission.json with OpenAI Developers' $chatgpt-app-submission skill

Why

The OpenAI submission import requires every tool to declare readOnlyHint, openWorldHint, and destructiveHint explicitly. The submission skill stopped before generating the artifact because the existing tool descriptors did not satisfy that contract.

docs and search are marked non-read-only because every invocation records a tool-call metric. They cannot change public or third-party state. execute can call the authenticated Cloudflare API, including operations that publish, overwrite, or delete resources, so it carries the strongest write annotations.

The generated artifact covers the production default Code Mode endpoint at https://mcp.cloudflare.com/mcp: three tools, five positive tests, and three negative tests.

Validation

  • npm run check
  • 21 test files passed
  • 281 tests passed
  • npx oxfmt --check chatgpt-app-submission.json
  • strict local validation of the submission schema shape, tool names, and test counts
  • Codex CLI 0.153.2 with the official OpenAI Developers $chatgpt-app-submission skill

Follow-up warning

search and execute do not declare outputSchema. The OpenAI skill reports this as a reliability warning, not a submission blocker.

@acoyfellow
acoyfellow marked this pull request as ready for review September 4, 2026 12:48
Comment thread src/tools/docs-search.ts
annotations: { title: 'Cloudflare Docs Search', readOnlyHint: true }
annotations: {
title: 'Cloudflare Docs Search',
readOnlyHint: false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surely this is readonly?

Comment thread src/tools/docs-search.ts
annotations: {
title: 'Cloudflare Docs Search',
readOnlyHint: true
readOnlyHint: false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Comment thread src/tools/search.ts
annotations: {
title: 'Cloudflare API Spec Search',
readOnlyHint: true
readOnlyHint: false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@acoyfellow

Copy link
Copy Markdown
Contributor Author

Ty @mattzcarey-

I changed docs and search locally to readOnlyHint: true, but openai's$chatgpt-app-submission validation blocks it:

**Blocked. No files were edited.**

Two submission blockers:

1. `docs` and `search` declare `readOnlyHint: true` in source and JSON, but production Code Mode records Analytics Engine metrics for every invocation. The submission rules classify logging as a write, requiring `readOnlyHint: false`. See [server.ts](/Users/jcoeyman/cloudflare/mcp/src/server.ts:18), [metrics.ts](/Users/jcoeyman/cloudflare/mcp/src/metrics.ts:239), and [chatgpt-app-submission.json](/Users/jcoeyman/cloudflare/mcp/chatgpt-app-submission.json:11).

2. The JSON uses the obsolete `$schema` URL. The current schema requires the exact canonical value `https://developers.openai.com/plugins-submission/chatgpt-app-submission.schema.json`; validation fails specifically at `$schema`. 

The default endpoint is correctly routed to Code Mode and exposes `docs`, `search`, and `execute`. `execute` annotations are consistent. [mcp-handler.ts](/Users/jcoeyman/cloudflare/mcp/src/mcp-handler.ts:32)

Non-blocking warning: `search` and `execute` lack `outputSchema`; `docs` has one.

Format, lint, and typecheck passed. Tests could not start because the read-only sandbox prevented Vite from creating `node_modules/.vite-temp`. The live endpoint was reachable but returned the expected unauthenticated `401`, so live `tools/list` could not be inspected without credentials. 

So i think OpenAI’s validator uses a stricter definition: because those tools record an internal usage metric, it considers them writes..

@mattzcarey

Copy link
Copy Markdown
Contributor

Ty @mattzcarey-

I changed docs and search locally to readOnlyHint: true, but openai's$chatgpt-app-submission validation blocks it:

**Blocked. No files were edited.**

thats hectic @acoyfellow

@mattzcarey
mattzcarey merged commit 46641b2 into cloudflare:main Sep 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants