Skip to content

Fix Claude API incompatibility in update_project tool schema#10902

Merged
mnkiefer merged 6 commits intomainfrom
copilot/analyze-latest-campaign-run
Jan 20, 2026
Merged

Fix Claude API incompatibility in update_project tool schema#10902
mnkiefer merged 6 commits intomainfrom
copilot/analyze-latest-campaign-run

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 20, 2026

Campaign workflows failed with Claude Sonnet 4.5 due to oneOf at the top level of the update_project tool's input schema. Anthropic's API does not support oneOf, allOf, or anyOf at the schema root.

Changes

Flattened tool schema structure

  • Removed top-level oneOf discriminated union
  • Made project the only required field
  • Documented three usage modes in tool description:
    1. Add/update project item (requires content_type)
    2. Create project fields (requires operation='create_fields' + field_definitions)
    3. Create project view (requires operation='create_view' + view)

Before:

{
  "inputSchema": {
    "type": "object",
    "oneOf": [
      {"required": ["project", "operation", "field_definitions"]},
      {"required": ["project", "operation", "view"]},
      {"required": ["project", "content_type"]}
    ],
    "properties": {...}
  }
}

After:

{
  "inputSchema": {
    "type": "object",
    "required": ["project"],
    "properties": {
      "operation": {
        "description": "Optional operation mode. Use create_fields to create required campaign fields up-front, or create_view to add a project view. When omitted, the tool adds/updates project items."
      },
      "content_type": {
        "description": "Type of item to add to the project. Required when operation is not specified."
      }
      // ... other fields with clarified descriptions
    }
  }
}

Impact

  • Campaign workflows using Claude Sonnet 4.5 can now execute successfully
  • No breaking changes - existing tool calls remain compatible
  • Applied to both actions/setup/js/safe_outputs_tools.json and pkg/workflow/js/safe_outputs_tools.json
Original prompt

Analyze latest campaign run: https://github.com/githubnext/gh-aw/actions/runs/21187615871/job/60946336202


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 20, 2026 21:27
…tool

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
… schema

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
@mnkiefer mnkiefer marked this pull request as ready for review January 20, 2026 21:34
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Analyze latest campaign run results Fix Claude API incompatibility in update_project tool schema Jan 20, 2026
Copilot AI requested a review from mnkiefer January 20, 2026 21:46
@mnkiefer mnkiefer merged commit d838f87 into main Jan 20, 2026
48 checks passed
@mnkiefer mnkiefer deleted the copilot/analyze-latest-campaign-run branch January 20, 2026 21:50
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