LearnNewsExamplesServices
Frontmatter
id7649
titleFeat: Make `agent` parameter required for `create_comment` tool and simplify implementation
stateClosed
labels
enhancementai
assigneestobiu
createdAtOct 25, 2025, 6:04 PM
updatedAtOct 25, 2025, 6:08 PM
githubUrlhttps://github.com/neomjs/neo/issues/7649
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 25, 2025, 6:08 PM

Feat: Make agent parameter required for create_comment tool and simplify implementation

Closed v11.0.0 enhancementai
tobiu
tobiu commented on Oct 25, 2025, 6:04 PM

This ticket documents the change to make the agent parameter a required input for the create_comment tool, and the subsequent simplification of the createComment method in PullRequestService.mjs.

Motivation: Making the agent parameter required improves the contract of the create_comment tool, ensuring that all comments made by agents are properly attributed and formatted with an icon. This also allows for a simplification of the underlying createComment method by removing conditional logic for the agent parameter's presence.

Changes Implemented:

  1. OpenAPI Definition Update (Prerequisite):

    • The agent parameter in the create_comment tool's requestBody schema has been moved from the properties section to the required array. This ensures that the agent string is always provided when calling the tool.
  2. PullRequestService.mjs Simplification:

    • The createComment method in ai/mcp/server/github-workflow/services/PullRequestService.mjs has been simplified. The if (agent) conditional check has been removed, as the agent parameter is now guaranteed to be present.
    • The logic for constructing finalBody now directly incorporates the agent's header and icon, streamlining the comment formatting process.

This change enhances the robustness of agent comments and simplifies the codebase.

tobiu added the enhancement label on Oct 25, 2025, 6:04 PM
tobiu added the ai label on Oct 25, 2025, 6:05 PM
tobiu assigned to @tobiu on Oct 25, 2025, 6:07 PM
tobiu referenced in commit 7b3b100 - "Feat: Make agent parameter required for create_comment tool and simplify implementation #7649" on Oct 25, 2025, 6:07 PM
tobiu closed this issue on Oct 25, 2025, 6:08 PM