Skip to content

Specify MCP server constraint enforcement for immediate LLM feedback#15996

Merged
pelikhan merged 3 commits intomainfrom
copilot/update-safe-output-specification
Feb 15, 2026
Merged

Specify MCP server constraint enforcement for immediate LLM feedback#15996
pelikhan merged 3 commits intomainfrom
copilot/update-safe-output-specification

Conversation

Copy link
Contributor

Copilot AI commented Feb 15, 2026

The add_comment tool enforces constraints (max 10 mentions, max 50 links, max 65536 chars) only during safe output processing. The LLM receives no feedback when violations occur and cannot self-correct.

Changes

Specification (Section 8.3)

  • MCE1-MCE5: Formal requirements for MCP servers to validate constraints at tool invocation time
  • Dual enforcement pattern: MCP server validates for LLM feedback, processor validates for defense-in-depth
  • Constraint consistency requirement across tool schemas and implementations

Tool Descriptions (safe_outputs_tools.json)

{
  "name": "add_comment",
  "description": "...IMPORTANT: Comments are subject to validation constraints - maximum 65536 characters for the complete comment (including footer which is added automatically), 10 mentions (@username), and 50 links. Exceeding these limits will result in an immediate error with specific guidance.",
  "inputSchema": {
    "properties": {
      "body": {
        "description": "...CONSTRAINTS: The complete comment (your body text + automatically added footer) must not exceed 65536 characters total. A footer (~200-500 characters) is automatically appended, so leave adequate space. Maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message..."
      }
    }
  }
}

add_comment Type Definition

  • Enforced Constraints table with limits, error codes (E006-E008), and example messages
  • Updated operational semantics to document constraint enforcement flow
  • Clarified that the 65536 character limit applies to the complete comment including the automatically appended footer (~200-500 characters), not just the user-provided body text

Result

LLMs now see constraints before tool invocation and receive immediate, actionable errors on violations rather than discovering failures post-execution. The clarification about footer space ensures LLMs reserve adequate room for the automatically appended workflow attribution.

Version: 1.10.0 → 1.11.0

Custom agent used: w3c-specification-writer
AI technical specification writer following W3C conventions and best practices for formal specifications

Original prompt

Update safe output specification to note that the MCP server must enforce constraints, update tool description to surface them and provide meaningful responses to the LLM.

See #15976

Custom agent used: w3c-specification-writer
AI technical specification writer following W3C conventions and best practices for formal specifications


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

…orcement

- Add Section 8.3 "MCP Server Constraint Enforcement" with requirements MCE1-MCE5
- Update add_comment tool description to surface constraints (65536 chars, 10 mentions, 50 links)
- Document dual enforcement pattern (MCP server + safe output processor)
- Add constraint table with error codes
- Update specification version to 1.11.0
- Add changelog entry for 2026-02-15

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update safe output specification to enforce MCP server constraints Specify MCP server constraint enforcement for immediate LLM feedback Feb 15, 2026
Copilot AI requested a review from pelikhan February 15, 2026 23:06
Copy link
Contributor

@pelikhan pelikhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot body length may be less to accommodate footer.

The 65536 character limit applies to the complete comment including the
automatically appended footer (~200-500 chars), not just the user-provided
body text. Updated tool description and specification to clarify this and
advise users to leave adequate headroom.

Addresses feedback from @pelikhan in comment 3805740071

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 15, 2026

@copilot body length may be less to accommodate footer.

Updated tool description and specification to clarify that the 65536 character limit applies to the complete comment including the automatically appended footer (~200-500 characters). The body field description now advises users to leave adequate space for the footer.

Commit: f06ab77

Copilot AI requested a review from pelikhan February 15, 2026 23:28
@pelikhan pelikhan marked this pull request as ready for review February 15, 2026 23:35
Copilot AI review requested due to automatic review settings February 15, 2026 23:35
@pelikhan pelikhan merged commit 525da85 into main Feb 15, 2026
@pelikhan pelikhan deleted the copilot/update-safe-output-specification branch February 15, 2026 23:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Safe Outputs MCP Gateway Specification and surfaced tool schemas to require and describe constraint enforcement at MCP tool invocation time, improving immediate feedback to LLMs when a tool call violates limits.

Changes:

  • Added a new spec section (8.3) defining normative MCP server constraint enforcement requirements (MCE1–MCE5) and documenting the dual-enforcement model.
  • Updated add_comment tool descriptions to disclose constraints (length/mentions/links), including the “footer counts toward length” clarification.
  • Propagated updated add_comment descriptions into multiple compiled workflow lockfiles’ embedded safe-outputs tool schema.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 35 comments.

Show a summary per file
File Description
pkg/workflow/js/safe_outputs_tools.json Expands add_comment tool + input descriptions to explicitly disclose enforced limits (incl. footer headroom guidance).
docs/src/content/docs/reference/safe-outputs-specification.md Bumps spec version and adds MCP-server-side constraint enforcement requirements + updated add_comment definition text.
.github/workflows/workflow-health-manager.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/unbloat-docs.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/technical-doc-writer.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/sub-issue-closer.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/smoke-test-tools.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/smoke-temporary-id.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/smoke-project.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/smoke-opencode.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/smoke-copilot.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/smoke-copilot-sdk.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/smoke-codex.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/smoke-claude.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/scout.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/refiner.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/q.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/pr-triage-agent.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/poem-bot.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/pdf-summary.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/issue-triage-agent.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/issue-monster.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/draft-pr-cleanup.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/discussion-task-miner.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/dev-hawk.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/daily-fact.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/daily-cli-performance.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/daily-assign-issue-to-user.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/craft.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/cloclo.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/ci-doctor.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/brave.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/archie.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.
.github/workflows/agent-performance-analyzer.lock.yml Updates embedded safe-outputs add_comment tool description to mention constraints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +289 to 295
"description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters, 10 mentions (@username), and 50 links. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 2 comment(s) can be added.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"body": {
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation.",
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters, maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",
"type": "string"
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as other updated lockfiles: the add_comment constraints here mention “maximum 65536 characters” but don’t clarify that the limit is for the final comment including the automatically appended footer. Please include the footer/headroom wording (or regenerate lock files from the canonical tools schema).

See below for a potential fix:

              "description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters for the final posted comment (including the automatically appended audit/footer text), 10 mentions (@username), and 50 links. Leave reasonable headroom in your content so the footer does not cause the limit to be exceeded. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 2 comment(s) can be added.",
              "inputSchema": {
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters for the final posted comment including the automatically appended audit/footer text (leave headroom so the footer does not push the comment over the limit), maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",

Copilot uses AI. Check for mistakes.
Comment on lines +295 to 301
"description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters, 10 mentions (@username), and 50 links. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 1 comment(s) can be added.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"body": {
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation.",
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters, maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",
"type": "string"
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as other updated lockfiles: the add_comment constraints here mention “maximum 65536 characters” but don’t clarify that the limit is for the final comment including the automatically appended footer. Please include the footer/headroom wording (or regenerate lock files from the canonical tools schema).

See below for a potential fix:

              "description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters, 10 mentions (@username), and 50 links. The 65536-character limit applies to the final posted comment, including any standard footer that the MCP server automatically appends; leave sufficient headroom (for example, keep tool-generated content under 60000 characters) to allow space for this footer. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 1 comment(s) can be added.",
              "inputSchema": {
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters for the final posted comment, including any standard footer automatically appended by the MCP server, maximum 10 mentions (@username), maximum 50 links (http/https URLs). Callers should leave enough headroom (for example, keep the body under 60000 characters) so that the footer does not cause the total to exceed the limit. If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",

Copilot uses AI. Check for mistakes.
Comment on lines +350 to 356
"description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters, 10 mentions (@username), and 50 links. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 1 comment(s) can be added.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"body": {
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation.",
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters, maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",
"type": "string"
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as other updated lockfiles: the add_comment constraints here mention “maximum 65536 characters” but don’t clarify that the limit is for the final comment including the automatically appended footer. Please include the footer/headroom wording (or regenerate lock files from the canonical tools schema).

See below for a potential fix:

              "description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters (for the final comment after the server appends its standard footer; leave some headroom rather than using the full limit), 10 mentions (@username), and 50 links. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 1 comment(s) can be added.",
              "inputSchema": {
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters (applied to the final comment after the server appends its standard footer, so you should leave some headroom instead of using the full limit), maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",

Copilot uses AI. Check for mistakes.
Comment on lines +284 to 290
"description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters, 10 mentions (@username), and 50 links. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 1 comment(s) can be added. Target: *.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"body": {
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation.",
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters, maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",
"type": "string"
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as other updated lockfiles: the add_comment constraints here mention “maximum 65536 characters” but don’t clarify that the limit is for the final comment including the automatically appended footer. Please include the footer/headroom wording (or regenerate lock files from the canonical tools schema).

See below for a potential fix:

              "description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters, 10 mentions (@username), and 50 links. The 65536-character limit applies to the final rendered comment, including the automatically appended audit/footer text; to preserve headroom for this footer, the server enforces a slightly lower limit on the body content itself. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 1 comment(s) can be added. Target: *.",
              "inputSchema": {
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters for the final comment including the automatically appended audit/footer text; the server reserves headroom for this footer and therefore validates the body content itself at a slightly lower limit (approximately 65000 characters), plus maximum 10 mentions (@username) and maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",

Copilot uses AI. Check for mistakes.
Comment on lines +1841 to +1845
1. **Constraint Enforcement**: The MCP server validates body content before recording operations. Violations trigger immediate error responses with specific guidance (see Section 8.3). The body length limit applies to user-provided content; a second validation occurs after footer addition to ensure the complete comment doesn't exceed limits.
2. **Context Resolution**: When `item_number` omitted, resolves from workflow trigger context.
3. **Related Items**: When multiple outputs created, adds related items section to comments.
4. **Footer Injection**: Appends footer according to configuration (typically 200-500 characters).
5. **Cross-Repository**: Supports `target-repo` configuration.
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Operational Semantics bullet 1 is currently contradictory about length validation: it says the body length limit applies to user-provided content, but the constraint table/note below states the 65536 limit applies to the final comment including the footer. Please reword this to make it explicit that validation occurs twice (pre-footer and post-footer) while the authoritative limit is on the final rendered comment (including footer), and that callers should reserve headroom for the footer to avoid post-footer failures.

Copilot uses AI. Check for mistakes.
Comment on lines +272 to 278
"description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters, 10 mentions (@username), and 50 links. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 5 comment(s) can be added.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"body": {
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation.",
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters, maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",
"type": "string"
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as other updated lockfiles: the add_comment constraints here mention “maximum 65536 characters” but don’t clarify that the limit is for the final comment including the automatically appended footer. Please include the footer/headroom wording (or regenerate lock files from the canonical tools schema).

See below for a potential fix:

              "description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters total (including the automatically appended audit footer), 10 mentions (@username), and 50 links. Leave sufficient headroom for the footer (for example, at least 1024 characters) so that the combined length of your comment and the footer does not exceed 65536 characters. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 5 comment(s) can be added.",
              "inputSchema": {
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Your text plus the automatically appended audit footer must not exceed 65536 characters in total; leave headroom (for example, at least 1024 characters) to accommodate the footer. Additionally, there is a maximum of 10 mentions (@username) and a maximum of 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",

Copilot uses AI. Check for mistakes.
Comment on lines +1849 to +1855
| Constraint | Limit | Error Code | Example Error Message |
|------------|-------|------------|----------------------|
| Body length (complete comment including footer) | 65536 characters | E006 | "Comment body exceeds maximum length of 65536 characters (got 70000)" |
| Mentions | 10 per comment | E007 | "Comment contains 15 mentions, maximum is 10" |
| Links | 50 per comment | E008 | "Comment contains 60 links, maximum is 50" |

**Note**: The 65536 character limit applies to the final comment text including the automatically appended footer. Users should leave approximately 200-500 characters of headroom to accommodate the footer, which contains workflow attribution and installation instructions.
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new add_comment constraint error codes (E006–E008) conflict with the spec’s existing Error Code Catalog (Section 9.5), where E006–E008 already have different meanings. This makes the spec internally inconsistent and ambiguous for implementers. Please either allocate new unique error codes for add_comment constraint violations (and update all examples/tables), or update the global Error Code Catalog (and any implementations) so each code maps to exactly one meaning.

Copilot uses AI. Check for mistakes.
Comment on lines +219 to 225
"description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters, 10 mentions (@username), and 50 links. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 20 comment(s) can be added. Target: *.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"body": {
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation.",
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters, maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",
"type": "string"
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as other updated lockfiles: the add_comment constraints here mention “maximum 65536 characters” but don’t clarify that the limit is for the final comment including the automatically appended footer. Please include the footer/headroom wording (or regenerate lock files from the canonical tools schema) so the LLM can budget space correctly.

See below for a potential fix:

              "description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters, 10 mentions (@username), and 50 links. The 65536-character limit applies to the final comment after the MCP server automatically appends its footer; leave sufficient headroom (for example, keep your own content under about 64000 characters) so the footer does not cause the request to exceed the limit. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 20 comment(s) can be added. Target: *.",
              "inputSchema": {
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters for the final comment after the MCP server's automatically appended footer (keep your own content safely below this, e.g., under about 64000 characters), maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",

Copilot uses AI. Check for mistakes.
Comment on lines +280 to 286
"description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters, 10 mentions (@username), and 50 links. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 2 comment(s) can be added.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"body": {
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation.",
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters, maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",
"type": "string"
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as other updated lockfiles: the add_comment constraints here mention “maximum 65536 characters” but don’t clarify that the limit is for the final comment including the automatically appended footer. Please include the footer/headroom wording (or regenerate lock files from the canonical tools schema).

See below for a potential fix:

              "description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters, 10 mentions (@username), and 50 links. The 65536-character limit applies to the final stored comment, including any automatically appended footer from the MCP server, so callers should leave sufficient headroom below the hard limit. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 2 comment(s) can be added.",
              "inputSchema": {
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters (for the final stored comment including any automatically appended footer from the MCP server, so keep the supplied body somewhat below this to allow headroom), maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",

Copilot uses AI. Check for mistakes.
Comment on lines +365 to 371
"description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters, 10 mentions (@username), and 50 links. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 3 comment(s) can be added. Target: *.",
"inputSchema": {
"additionalProperties": false,
"properties": {
"body": {
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation.",
"description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters, maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",
"type": "string"
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as other updated lockfiles: the add_comment constraints here mention “maximum 65536 characters” but don’t clarify that the limit is for the final comment including the automatically appended footer. Please include the footer/headroom wording (or regenerate lock files from the canonical tools schema).

See below for a potential fix:

              "description": "Add a comment to an existing GitHub issue, pull request, or discussion. Use this to provide feedback, answer questions, or add information to an existing conversation. For creating new items, use create_issue, create_discussion, or create_pull_request instead. IMPORTANT: Comments are subject to validation constraints enforced by the MCP server - maximum 65536 characters, 10 mentions (@username), and 50 links. The 65536-character limit applies to the final comment after an automatically appended footer, so leave some headroom (for example, keep the body well under the hard limit) to avoid exceeding it. Exceeding these limits will result in an immediate error with specific guidance. CONSTRAINTS: Maximum 3 comment(s) can be added. Target: *.",
              "inputSchema": {
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "description": "The comment text in Markdown format. This is the 'body' field - do not use 'comment_body' or other variations. Provide helpful, relevant information that adds value to the conversation. CONSTRAINTS: Maximum 65536 characters (for the final comment including the automatically appended footer, so leave some headroom), maximum 10 mentions (@username), maximum 50 links (http/https URLs). If these limits are exceeded, the tool call will fail with a detailed error message indicating which constraint was violated.",

Copilot uses AI. Check for mistakes.
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