Skip to content

[Safe Outputs Conformance] IMP-003: generateCustomJobToolDefinition function missing from safe_outputs_config_generation.go #17760

@github-actions

Description

@github-actions

Conformance Check Failure

Check ID: IMP-003
Severity: MEDIUM
Category: Implementation

Problem Description

The IMP-003 conformance check verifies that pkg/workflow/safe_outputs_config_generation.go contains a generateCustomJobToolDefinition function for dynamic MCP tool schema generation. This function is absent from the file.

The file currently exports only two functions:

  • populateDispatchWorkflowFiles
  • generateSafeOutputsConfig

The specification requires that safe output types support dynamic schema generation (i.e., the ability to generate MCP tool definitions at runtime based on configuration, rather than relying solely on the static schema in pkg/workflow/js/safe_outputs_tools.json). Without generateCustomJobToolDefinition, any custom job tool types cannot have their schemas generated dynamically.

Affected Components

  • File: pkg/workflow/safe_outputs_config_generation.go
  • Expected function: generateCustomJobToolDefinition
  • Related static schema: pkg/workflow/js/safe_outputs_tools.json (present and contains inputSchema)
  • Related config: pkg/workflow/safe_outputs_config.go (has Schema Generation Architecture documentation)

Current Behavior

pkg/workflow/safe_outputs_config_generation.go does not define generateCustomJobToolDefinition. Custom job tool definition generation is either unimplemented or handled elsewhere without the expected function name.

Expected Behavior

Per the IMP-003 check, a generateCustomJobToolDefinition function should exist in pkg/workflow/safe_outputs_config_generation.go. This function should accept a custom job tool configuration and return an MCP-compatible tool definition with a populated inputSchema.

Remediation Steps

This task can be assigned to a Copilot coding agent with the following steps:

  1. Review pkg/workflow/safe_outputs_config.go (which contains Schema Generation Architecture documentation) to understand the intended design for dynamic schema generation.
  2. Review pkg/workflow/js/safe_outputs_tools.json to understand the static schema format that generateCustomJobToolDefinition should produce dynamically.
  3. Review generateSafeOutputsConfig in pkg/workflow/safe_outputs_config_generation.go to understand the existing generation patterns.
  4. Implement generateCustomJobToolDefinition in pkg/workflow/safe_outputs_config_generation.go that generates an MCP tool definition (with inputSchema) for a given custom job safe output type.
  5. Add appropriate unit tests.

Verification

After remediation, verify the fix by running:

bash scripts/check-safe-outputs-conformance.sh

IMP-003 should pass: [PASS] IMP-003: Schema generation is implemented.

References

  • Safe Outputs Specification: docs/src/content/docs/reference/safe-outputs-specification.md
  • Conformance Checker: scripts/check-safe-outputs-conformance.sh (lines 358–396, check_schema_consistency)
  • Config Generation: pkg/workflow/safe_outputs_config_generation.go
  • Static Schema: pkg/workflow/js/safe_outputs_tools.json
  • Architecture Docs: pkg/workflow/safe_outputs_config.go
  • Run ID: §22281286232
  • Date: 2026-02-22

Generated by Daily Safe Outputs Conformance Checker

  • expires on Feb 23, 2026, 5:01 PM UTC

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions