Skip to content

Debugging a Tool

Debugging in superglue is agent-first. Tell the playground agent what you expected, what happened instead, and which test input reproduces the problem. The agent can inspect the current draft and its latest execution results, test a focused change, and present the proposed edit for your review.

  1. Set a representative input: In Tool Input, enter the JSON values and bind any required files that reproduce the issue.
  2. Run the tool: Select Run All Steps to execute the current draft from start to finish. The playground focuses the first failed step or the final result when execution ends.
  3. Ask the agent to investigate: Select Fix in chat on a failed step or transform, or describe an incorrect result in the playground chat. Include the expected result when the run succeeds but the data is wrong.
  4. Review the proposed edit: The agent tests its change before proposing it. Inspect the diff and accept it only when it matches your intent.
  5. Verify with the same input: Rerun the affected step or the full tool, then save once the result is correct.

The Tool Input card contains the values used for playground runs:

  • Test Input or JSON & File Inputs contains the current payload and file bindings.
  • Input Schema defines the expected input shape. When a schema exists, superglue generates a starting payload and warns before running input that does not match it.
  • Required file inputs must be bound before execution. You can still choose Run Anyway from the warning when intentionally testing an incomplete case.

Use stable, minimal test data while debugging. Changing the input and the tool at the same time makes it harder to tell which change fixed the problem.

Each step has three views:

  • Step Input shows the evaluated currentItem together with payload and upstream step data. Run the preceding steps first when this input is not available yet.
  • Step Config shows the instruction, system connection, request configuration, and optional pagination or advanced settings.
  • Step Result shows the response data or execution error returned by that step.

Use Run Step to test one step without rerunning the full tool. For a loop step, Run single iteration tests the first item before you execute the complete loop. When a step fails, Fix in chat sends its error to the agent and asks it to diagnose and repair the step.

The final card turns step results into the tool’s returned output:

  • Step Input shows the data available to the final transform.
  • Transform Code controls how that data is shaped.
  • Result Schema optionally validates the returned structure.
  • Result shows the transformed output or error.

Select Transform Output to retest only this layer after the preceding steps have completed. If it fails, use Fix in chat so the agent can inspect the transform error and propose a correction.

Rerun the original failing case after accepting an edit. Then test one normal case and one edge case, such as an empty response or a loop with multiple items. Save only after the final result and any external writes match what you intended.