Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 18, 2025

The custom agent instructions for adding safe output types (copilot-add-safe-output-type.md) were missing a critical step: updating pkg/workflow/js/safe_outputs_tools.json with the new tool signature. Without this, AI agents cannot discover or call newly added safe output types through the MCP server.

Changes

  • Added Step 3: Update Safe Outputs Tools JSON

    • Documents the tool signature format (name, description, inputSchema)
    • Clarifies naming convention: use underscores (e.g., create_issue) not hyphens
    • Explains type flexibility: use "type": ["number", "string"] for numeric fields
    • Provides complete example from existing create_issue tool
  • Updated success criteria and pitfalls

  • Renumbered implementation steps 4-11 to maintain sequence

Example Tool Signature

{
  "name": "your_new_type",
  "description": "Brief description of what this tool does",
  "inputSchema": {
    "type": "object",
    "required": ["required_field"],
    "properties": {
      "required_field": {
        "type": "string",
        "description": "Description of the required field"
      }
    },
    "additionalProperties": false
  }
}
Original prompt

Update the custom agent that helps to create custom safe output type to specify to update the tools.json with the new tool signature.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 18, 2025 19:37
…ions

- Added comprehensive Step 3 documentation for updating pkg/workflow/js/safe_outputs_tools.json
- Included tool signature format and MCP server integration details
- Provided clear guidelines on naming conventions (underscores vs hyphens)
- Added example tool signatures including create_issue
- Explained why numeric fields should accept both number and string types
- Renumbered all subsequent steps (4-11) to maintain correct sequence

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Added "Safe outputs tools JSON includes the new tool signature" to success criteria
- Added "Missing tools.json update" as a common pitfall with explanation
- Updated naming consistency pitfall to mention underscores in tools.json
- Renumbered common pitfalls to maintain sequence

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update tools.json with new tool signature Add tools.json update step to safe output type custom agent instructions Nov 18, 2025
Copilot AI requested a review from pelikhan November 18, 2025 19:41
@pelikhan pelikhan marked this pull request as ready for review November 18, 2025 19:50
Copilot AI review requested due to automatic review settings November 18, 2025 19:50
@pelikhan pelikhan merged commit 3126eed into main Nov 18, 2025
6 checks passed
@pelikhan pelikhan deleted the copilot/update-tools-json-signature branch November 18, 2025 19:50
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

This PR enhances the custom agent instructions for adding safe output types by documenting a critical missing step: updating the safe_outputs_tools.json file with tool signatures. Without this update, AI agents cannot discover or invoke newly created safe output types through the MCP server.

Key changes:

  • Added comprehensive Step 3 documenting how to update safe_outputs_tools.json with tool signatures
  • Renumbered subsequent implementation steps (4-11) to maintain sequence
  • Updated success criteria checklist to include tools.json verification
  • Added "Missing tools.json update" as a common pitfall with clear warning

Reviewed Changes

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

File Description
.github/agents/copilot-add-safe-output-type.md Added new Step 3 with detailed guidance on updating safe_outputs_tools.json, including tool signature format, naming conventions, type flexibility guidelines, and complete examples. Updated success criteria and common pitfalls to emphasize this requirement.
pkg/workflow/js/check_skip_if_match.test.cjs Code formatting changes only - collapsed multi-line expect() calls to single lines for consistency with project style. No functional changes.

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

```json
{
"name": "your_new_type",
"description": "Brief description of what this tool does (use underscores in name, not hyphens)",
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

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

The description field in the example JSON contains usage instructions that should not be part of the actual description field. The parenthetical "(use underscores in name, not hyphens)" should be removed from the description value and kept only in the guidelines below.

The description should be something like:

"description": "Brief description of what this tool does"

The naming convention guidance is already covered in the Tool Signature Guidelines section below.

Suggested change
"description": "Brief description of what this tool does (use underscores in name, not hyphens)",
"description": "Brief description of what this tool does",

Copilot uses AI. Check for mistakes.
Comment on lines +189 to +190
- Tool `name` must use underscores (e.g., `your_new_type`), matching the type field in the JSONL output
- The `name` field should match the safe output type name with underscores instead of hyphens
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

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

These two guidelines are redundant and say essentially the same thing. Consider consolidating them into a single, clearer guideline:

- Tool `name` must use underscores (e.g., `your_new_type`) and match the safe output type name (converting hyphens to underscores if needed)
Suggested change
- Tool `name` must use underscores (e.g., `your_new_type`), matching the type field in the JSONL output
- The `name` field should match the safe output type name with underscores instead of hyphens
- Tool `name` must use underscores (e.g., `your_new_type`) and match the safe output type name (converting hyphens to underscores if needed)

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