Skip to main content

Testing Functions

Every runnable function has a test console on its page. For Local Python it sits beside the code on the Definition tab, with a Save and run button. For MCP servers and execution environment tools it is the Test tab. Skills have no console because a skill is prompt text, not a callable tool.

warning

A test run is real. It runs with the chosen agent's identity and integrations and calls the real service, so a tool that writes (creates an issue, sends a message) will do so.

You need the Editor role or higher to run tests.

Run a test​

  1. Open the function and go to the console (Definition for Local Python, Test otherwise).
  2. Pick Run as agent. The run uses that agent's identity, integrations and execution environment. The function doesn't need to be assigned to the agent; the result says whether it is.
  3. If the function exposes several tools (an MCP server or execution environment), pick the Tool. Click Reload to rebuild the tool list after a change.
  4. Choose how to drive the run:
    • I supply the arguments: fill in the form generated from the tool's parameters. Tick raw JSON to enter Arguments (JSON object) directly. Complex schemas always use JSON.
    • Let the agent decide: describe the task in What should the agent do?. The agent is given this function as its only tool, so if it answers without calling it, the description isn't telling the model when to use the tool.
  5. Click Run.

For Local Python you can instead click Save and run above the editor, which saves the code and runs the console with the current arguments.

Read the result​

The result shows a status chip (ok, error or needs_tool), the duration and the tool used. If an agent-driven run made calls, The agent called lists them with their arguments.

TabContents
OutputThe returned value, with Copy. Very large output is marked output truncated.
TraceWhat the run reached, read from its own log lines. A call the run didn't log won't appear.
LogsDiagnostics, and the traceback for an error. Show every frame expands the traceback beyond your own code.
RequestThe function ID, tool, identity and arguments that were sent.

needs_tool means the function exposes several tools and none was chosen. Pick one and run again.

Replay earlier runs​

Recent runs lists runs made from this console with the time, agent, arguments and duration. Click a run to load its arguments back into the form.

When no tools appear​

"This function produced no callable tools" means the function couldn't be built as the chosen agent. The log says why. Typical causes are a failed MCP handshake, a function body that doesn't load (for example a syntax error, or no function matching Function Name), or an integration that couldn't be reached.