Skip to content

Align with current tool-spec: parameters + data, inputs.json #13

Description

@mmaelicke

Summary

tool-runner-js relies on an outdated tool-spec. It uses parameters.json with a flat structure, mixes file inputs into parameters as type: file, and has no data section. No tools use this format anymore. This issue tracks aligning with the current spec.

Current (Outdated) Behavior

  • Input file: parameters.json (spec says input.json; ecosystem uses inputs.json)
  • Structure: Flat {toolName: {param: value, ...}} – no separation of parameters and data
  • ToolConfig: Only parameters; no data field
  • File inputs: Handled via type: file in parameters (asset-like)
  • Environment: PARAM_FILE=/in/parameters.json, RUN_TOOL

Current Spec (tool-specs)

  • Input file: /in/input.json or /in/inputs.json
  • Structure: {toolName: {parameters: {...}, data: {...}}} – parameters and data separated
  • tool.yml: parameters block for config args; data block for input files (with extension, description)
  • File inputs: Declared in data section; referenced by name in input file

Required Changes

  1. Input filename: Write inputs.json (or support both; gorun and tool-runner use inputs.json)
  2. ToolConfig: Add data field – List<string> | Dict<string, DataConfig> (name-only list or dict with extension, description)
  3. Input structure: Produce {toolName: {parameters: {...}, data: {name: "/in/path"}}}
  4. Parameter handling: Remove type: file special casing; file inputs belong in data
  5. Spec parsing: Parse data from tool.yml (support both list and dict formats per input.md)
  6. Parameter building: Split user input into parameters vs data; validate each against spec

Tasks Checklist

  • Add DataConfig interface (path/extension/description as in spec)
  • Extend ToolConfig with data field
  • Update tool.yml parser to extract data section
  • Change output to inputs.json with parameters and data keys
  • Remove type: file handling from parameter.ts; map data inputs via data section
  • Update environment / compatibility: PARAM_FILE can point to inputs.json for legacy containers (json2args accepts both)
  • Test with current templates (Python, Node with data section)

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions