Skip to content

docs(rhdh-jira-api): prefer MCP host adapter for single-issue reads and writes - #146

Open
gashcrumb wants to merge 1 commit into
redhat-developer:mainfrom
gashcrumb:feat/prefer-mcp-for-jira-writes
Open

gashcrumb wants to merge 1 commit into
redhat-developer:mainfrom
gashcrumb:feat/prefer-mcp-for-jira-writes

Conversation

@gashcrumb

Copy link
Copy Markdown
Member

Summary

Supersedes #119 (which could not be reopened after rebasing due to GitHub's force-push limitation on closed PRs).

Based on day-to-day dogfooding and agent interaction observations, defaulting to acli for all operations introduces several operational hurdles where the host Atlassian MCP adapter is cleaner, faster, and more reliable:

  • Silent 30-row truncation on search results when using acli without pagination flags (the fix: use CLAUDE_PLUGIN_ROOT for CLI path in skills #1 documented trap).
  • Silent empty custom fields on single issue reads unless --fields '*all' is explicitly passed, which models frequently miss.
  • Two-step workarounds for issue creation (setting priority and components requires a secondary REST call because acli create rejects those flags).
  • Missing operations entirely — remote link attachment (linking PRs to issues), worklog authoring, and comment visibility restrictions are not available in acli at all.

Conversely, acli remains the superior choice for bulk operations (batch transitions/edits by JQL, multi-page auto-walk) and board/sprint inspection.

Solution

Replace the acli-first default with an explicit adapter decision table covering the full Jira surface. This makes the operational tradeoffs explicit so coding agents select the right tool predictably:

Host adapter (MCP) is preferred for:

  • Single-issue reads with custom fields (fields: ["*all"], avoiding the silent empty-field trap)
  • Single-issue reads + comments in one call
  • Issue creation with priority and components in a single operation
  • Custom field writes (Story Points, Size, Team, Release Note Type) via native fields dictionaries rather than raw REST fallbacks
  • Remote links / PR web-link attachments (acli has no equivalent)
  • Comment visibility restrictions, worklogs, Confluence, and Teamwork Graph links

acli remains preferred for:

  • Batch transitions and edits by JQL (--jql ... --yes)
  • Board and sprint reads (exposing no MCP tools)
  • All-pages auto-walk (--paginate)
  • Saved filter lookup and attachment list/delete

Field Experience

We have been dogfooding and using these guidelines extensively in day-to-day agent workflows over the past several weeks. In practice, having the skill guide the agent toward native MCP tools for single-issue operations and custom-field writes has made Jira interactions significantly smoother, faster, and more reliable, eliminating empty-field bugs and multi-step fallback calls.

Files Changed

  • SKILL.md — adds an "Adapter choice" section and scopes the two silent-failure traps to acli only
  • references/auth.md — adds a 17-row adapter decision table covering operations, preferred adapters, and rationale
  • references/graphql-queries.md — reorders capability gate and updates fallback rules table with explicit MCP tool names
  • references/rest-api-fallback.md — updates capability gate to check auth.md first and prefer native MCP tools before REST fallbacks

…nd writes

The skill was built acli-first, which works but means models default to
acli even for operations where the MCP host adapter is cleaner or is the
only available option.

Concrete gaps with an acli-first default:
- Silent 30-row truncation on search (the redhat-developer#1 documented trap)
- Silent empty custom fields on issue reads without --fields '*all'
- Two-call workaround for issue create (priority and components require
  a separate REST call; acli create rejects those flags)
- Missing operations: remote link attachment, worklog authoring, and
  comment visibility restrictions are not available in acli at all

Key changes:
- Add an 'Adapter choice' section to SKILL.md listing which operations
  belong to the host adapter (MCP) vs acli.
- Replace the numbered API-preference list in auth.md with a full
  decision table (16 operation rows) with a reason for each choice.
- Scope the two silent-failure traps to acli only; note they do not
  apply when using the host adapter.
- Update rest-api-fallback.md: make the capability gate check auth.md
  first, and note that most custom-field writes are now native MCP
  operations rather than REST fallbacks.
- Update graphql-queries.md: reorder the capability gate to prefer the
  host adapter for single-issue reads; expand the fallback rules table
  with explicit MCP tool names for search, issue edit, remote links,
  worklogs, and cross-product graph links.

Operations where acli remains preferred (batch by JQL, boards, sprints,
saved filters, attachment list/delete) are preserved and documented.

Assisted-By: opencode

rh-pre-commit.version: 2.4.0
rh-pre-commit.check-secrets: ENABLED
@gashcrumb

Copy link
Copy Markdown
Member Author

/fs-review

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.

1 participant