Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

The missing_data safe output tool required data_type and reason fields, causing validation errors when the model couldn't provide specific details. The tool should allow the model to signal missing data without mandatory context.

Changes

Schema updates

  • Removed data_type and reason from required fields in both pkg/workflow/js/safe_outputs_tools.json and actions/setup/js/safe_outputs_tools.json

Handler implementation (actions/setup/js/missing_data.cjs)

  • Removed field validation logic
  • All fields now default to null when not provided
  • Conditional logging based on field presence

Test coverage (actions/setup/js/missing_data.test.cjs)

  • Added tests for empty messages, partial fields, and optional combinations
  • Removed tests expecting validation failures

Example

Previously would fail:

// ❌ Error: missing or empty 'data_type', 'reason'
{ type: "missing_data" }

Now succeeds with all scenarios:

// ✅ All valid
{ type: "missing_data" }
{ type: "missing_data", data_type: "credentials" }
{ type: "missing_data", reason: "Need API key" }
{ type: "missing_data", data_type: "credentials", reason: "Need API key" }
Original prompt

All fields in the "missing_data" safe output tool should be optional. The model can just tell us it's missing something.

❌ safeoutputs-missing_data
Arguments
{}
9 lines
calling "tools/call": Invalid arguments: missing or empty 'data_type', 'reason'

Required parameter 'data_type': Type or description of the missing data or information (max 128 characters). Be specific about what data is needed.
Required parameter 'reason': Explanation of why this data is needed to complete the task (max 256 characters).

Example:
{
  "data_type": "example value",
  "reason": "example value",
  "alternatives": "example value"
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 16, 2026 00:18
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Make all fields in missing_data optional Make all fields optional in missing_data safe output tool Jan 16, 2026
Copilot AI requested a review from pelikhan January 16, 2026 00:27
@pelikhan pelikhan marked this pull request as ready for review January 16, 2026 00:28
@pelikhan pelikhan merged commit 544b5ce into main Jan 16, 2026
47 checks passed
@pelikhan pelikhan deleted the copilot/update-missing-data-fields branch January 16, 2026 00:29
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