GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — MCP tool schema optional fields become required in OpenCode (jira_add_comment) · Issue #20661 · anomalyco/opencode

MCP tool schema optional fields become required in OpenCode (jira_add_comment) #20661

New issue
Copy link
New issue
Copy link
Closed
#33392
Closed
MCP tool schema optional fields become required in OpenCode (jira_add_comment)#20661
#33392
Copy link
Assignees
nexxeln

Description

@tarasovmo
tarasovmo
opened on Apr 2, 2026
Issue body actions

Description

What happened

In OpenCode 1.3.13, MCP tool jira_add_comment is treated as if optional fields are required.
As a result, the model sends extra args like:

  • visibility: ""
  • public: false
    and receives server validation errors (e.g. visibility must be valid JSON object).

Expected behavior

For jira_add_comment, only:

  • issue_key
  • body
    should be required. visibility and public must stay optional.

Environment

  • OpenCode: 1.3.13
  • Model: gpt-5.3-codex
  • MCP Jira server: ghcr.io/sooperset/mcp-atlassian:latest
    • image version: 0.21.0
    • revision: c450a161ec630dd57f44a2b15d977debae19eba5

Evidence: raw MCP schema is correct

Direct Jira MCP endpoint

tools/list for jira_add_comment returns:

"inputSchema": {
  "required": ["issue_key", "body"],
  "properties": {
    "visibility": { "type": "string", "default": null },
    "public": { "type": "boolean", "default": null }
  }
}

Evidence: OpenCode behavior
In OpenCode session data, actual tool calls include optional params even when not requested:
{
  "tool": "jira_jira_add_comment",
  "input": {
    "issue_key": "xxx",
    "body": "Test",
    "visibility": "",
    "public": false
  }
}
This leads to validation error from MCP Jira:
visibility must be a valid JSON object ...

Suspected root cause
OpenCode MCP tool adapter / tool registry path likely mutates or ignores optional/nullability in incoming inputSchema, causing optional fields to be treated as required (or aggressively auto-filled).

### Plugins

/sooperset/mcp-atlassian

### OpenCode version

1.3.13

### Steps to reproduce

1. Configure remote MCP Jira.
2. Ask model:  write comment "Test" for task xxx
3. Observe tool call args include visibility/public despite not being requested.
4. Observe comment-add failure until fallback/workaround is used.

### Screenshot and/or share link

<img width="1032" height="240" alt="Image" src="https://github.com/user-attachments/assets/65b4a771-6c6b-48b2-820c-746eef5aa8a5" />

### Operating System

Windows 11

### Terminal

_No response_
Reacted by Carlos Fontes, rupuin, Manan Vaghasiya, Paweł Chrobak, barkstone2, Ben Lei, ekisu and Björn Nilsved

Activity

  1. tarasovmo
    added
    bugSomething isn't working
    on Apr 2, 2026
  2. github-actions
    assigned
    rekram1-node
    on Apr 2, 2026
  3. github-actions
    added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    windows
    on Apr 2, 2026
  4. github-actions commented on Apr 2, 2026

    @github-actions
    github-actionsBot
    on Apr 2, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be related to an existing issue. Please check:

    • Bug: MCP tools with all-optional parameters fail when called without arguments — harness requires content.0.tool_use.input to be present #20637: MCP tools with all-optional parameters fail when called without arguments — both issues involve MCP tool schemas and optional parameter handling, though the symptoms differ slightly.
  5. thdxr
    removed
    bugSomething isn't working
    windows
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. thdxr
    assigned
    nexxeln
    and unassigned
    rekram1-node
    on May 3, 2026
  7. barkstone2
    marked Optional tool arguments are no longer omitted since 1.17.8, causing Linear MCP linear_save_issue to fail #32772 as a duplicate of this issue on Jun 18, 2026
  8. rekram1-node
    closed this as completedin #33392on Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @nexxeln
    nexxeln

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.