Specify MCP server constraint enforcement for immediate LLM feedback#15996
Specify MCP server constraint enforcement for immediate LLM feedback#15996
Conversation
…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>
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>
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 |
There was a problem hiding this comment.
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_commenttool descriptions to disclose constraints (length/mentions/links), including the “footer counts toward length” clarification. - Propagated updated
add_commentdescriptions 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.
| "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" |
There was a problem hiding this comment.
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.",
| "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" |
There was a problem hiding this comment.
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.",
| "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" |
There was a problem hiding this comment.
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.",
| "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" |
There was a problem hiding this comment.
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.",
| 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. |
There was a problem hiding this comment.
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.
| "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" |
There was a problem hiding this comment.
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.",
| | 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. |
There was a problem hiding this comment.
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.
| "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" |
There was a problem hiding this comment.
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.",
| "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" |
There was a problem hiding this comment.
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.",
| "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" |
There was a problem hiding this comment.
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.",
The
add_commenttool 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)
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
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
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.