Product and integration detail for GPT Actions and OpenAPI exposure.
Hard invariants agents must obey are in AGENTS.md
(architecture section). This document holds the longer product rules so
AGENTS.md stays an execution contract.
Related: GPT_ACTIONS.md, MCP.md.
When adding or renaming a runtime tool, update all of:
ToolCallenum / parserKNOWN_TOOL_NAMES- metadata
- registry schema
- OAuth runtime tool policy
- OpenAPI accepted names / examples
- MCP schema tests
- consistency tests
Tool metadata, registry, OAuth scope policy, MCP tools/list, and OpenAPI
callRuntimeTool names must stay synchronized.
- Do not expose legacy
/api/codexroutes in GPT Action OpenAPI. - Do not expose agent token management or pairing endpoints in GPT Action OpenAPI.
- WebCodex GPT Actions must stay below the 30-operation GPT Actions limit. Verify the current OpenAPI operation count through generation/tests rather than relying on any document for a fixed count. Do not hard-code a live operation total in agent rules.
- Prefer non-consequential labels for read-only, discovery, onboarding, and bounded local project setup actions.
registerProjectandcreateProjectare non-consequential onboarding actions when constrained by agent policy, allowed roots, and non-overwrite defaults.- Keep destructive actions consequential: shell/job execution, raw writes, patch application, delete/restore/discard, imports, and generic dispatch.
callRuntimeToolis advanced/generic; use dedicated Actions only for stable common workflows that fit the operation budget.- When adding future runtime tools, default to
callRuntimeToolexposure unless there is an explicit product reason and operation-count budget for a dedicated Action. listRuntimeToolsfull detail discovery includes expanded schemas and may be too large for GPT Actions. Daily discovery should prefercallRuntimeTool(tool="tool_manifest"); focusedlistRuntimeToolscalls should passsummary_only=truewithcategory,features, orlimit. Preferruntime_statusor the tool manifest for the current tool count; the response-size issue is expanded schema/metadata, not a fixed tool count.
list_projectsproject entries exposecapabilities.- Smoke selection should prefer
capabilities.recommended_for_smoke=true. - Git smoke must require
capabilities.git_available=true. agent:special:test-mcpmay be safe but not git-backed.
Chunked artifact upload tools remain runtime-only through callRuntimeTool;
do not promote them to dedicated GPT Action operations:
artifact_upload_beginartifact_upload_chunkartifact_upload_finishartifact_upload_abort
artifact_upload_chunk, artifact_upload_finish, and artifact_upload_abort
must repeat the exact path used by artifact_upload_begin. This binds
upload_id to the requested target artifact path.
Artifact smoke paths should use artifacts/smoke/<name>.artifact or
artifacts/smoke/<name>.txt. Verify abort cleanup with
artifact_upload_abort.final_file_exists or
read_project_artifact_metadata(allow_missing=true), not with expected read
failures. policy_rejected means policy blocked the request before a write.
- GPT Actions should prefer flattened top-level fields over
params/arguments. - Use
recording_session_idfor generic wrapper recorder metadata. - Use
session_idas tool business input. - When a runtime-only tool is expected to work through GPT Action
callRuntimeToolwith flattened top-level fields,ToolCallRequest.propertiesmust expose every flattened field that GPT Actions need (including nested object/list payload fields such asedits,validation,labels,checkpoint_id,confirm,dry_run,include_untracked, andinclude_diff_stat). - Add/update tests that fail when flattened Action fields are missing.
- Do not loosen
additionalPropertiestotrueas a workaround — list the needed flattened fields explicitly.