Tool Calls
Tool calls represent individual tool invocations within a session. They track the input, output, and status of each tool execution.
Tool Calls object
Attributes
object
StringString representing the object's type
id
StringUnique tool call identifier
tool_key
StringThe key identifying the tool that was called
type
StringThe type of the tool call
status
StringCurrent status of the tool call
source
StringSource of the tool call
transport
StringTransport protocol used
session_id
StringParent session ID
message_id
StringAssociated session message ID
session_provider_id
StringNullableSession provider ID
connection_id
StringNullableSession connection ID
provider_run_id
StringNullableProvider run ID
tool
ObjectNullableThe tool definition that was called
input
ObjectNullableInput data passed to the tool call
output
ObjectNullableOutput data returned from the tool call
error
ObjectNullableError details if the tool call failed
metadata
ObjectNullableCustom key-value metadata
created_at
DateTimestamp when created
{"object": "session.tool_call","id": "tcl_8hJkLmNpQrStUvWx","tool_key": "create_issue","type": "tool_call","status": "waiting_for_response","source": "client","transport": "mcp","session_id": "ses_4dEfGhJkLmNpQrSt","message_id": "smg_3cDeFgHjKlMnPqRs","session_provider_id": "spr_3cDeFgHjKlMnPqRs","connection_id": "scn_2bCdEfGhJkLmNpQr","provider_run_id": "prn_8hJkLmNpQrStUvWx","tool": {},"input": {},"output": {},"error": {},"metadata": {"source": "manual"},"created_at": "2025-09-15T10:30:00.000Z"}
List all tool calls
Returns a paginated list of tool calls across all sessions.
Query Parameters
limit
NumberOptionalMaximum number of items to return (1-100)
after
StringOptionalReturn items after this ID
before
StringOptionalReturn items before this ID
cursor
StringOptionalPagination cursor from a previous response
order
EnumOptionalSort order for results
session_template_id
UnionOptionalFilter by session template ID(s)
session_provider_id
UnionOptionalFilter by session provider ID(s)
provider_id
UnionOptionalFilter by provider ID(s)
provider_deployment_id
UnionOptionalFilter by provider deployment ID(s)
provider_config_id
UnionOptionalFilter by provider config ID(s)
provider_auth_config_id
UnionOptionalFilter by provider auth config ID(s)
tool_id
UnionOptionalFilter by tool ID(s)
curl -X GET "https://api.metorial.com/tool-calls" \-H "Authorization: Bearer metorial_sk_..."
Get tool call
Retrieves a specific tool call by ID.
URL Parameters
tool_call_id
StringThe unique identifier for the tool_call
curl -X GET "https://api.metorial.com/tool-calls/too_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."
List tool calls
Returns a paginated list of tool calls for a session.
URL Parameters
session_id
StringThe unique identifier for the session
Query Parameters
limit
NumberOptionalMaximum number of items to return (1-100)
after
StringOptionalReturn items after this ID
before
StringOptionalReturn items before this ID
cursor
StringOptionalPagination cursor from a previous response
order
EnumOptionalSort order for results
session_template_id
UnionOptionalFilter by session template ID(s)
session_provider_id
UnionOptionalFilter by session provider ID(s)
provider_id
UnionOptionalFilter by provider ID(s)
provider_deployment_id
UnionOptionalFilter by provider deployment ID(s)
provider_config_id
UnionOptionalFilter by provider config ID(s)
provider_auth_config_id
UnionOptionalFilter by provider auth config ID(s)
tool_id
UnionOptionalFilter by tool ID(s)
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/tool-calls" \-H "Authorization: Bearer metorial_sk_..."
Get tool call
Retrieves a specific tool call for a session.
URL Parameters
session_id
StringThe unique identifier for the session
tool_call_id
StringThe unique identifier for the tool_call
curl -X GET "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/tool-calls/too_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."
Create tool call
Creates a new tool call in a session by invoking a specific tool.
URL Parameters
session_id
StringThe unique identifier for the session
Request Body
tool_id
StringThe ID of the tool to call
input
ObjectInput data to pass to the tool
metadata
ObjectOptionalOptional metadata for the tool call
curl -X POST "https://api.metorial.com/sessions/ses_Rm4Mnheq2bfEPhBhP7SY/tool-calls" \-H "Content-Type: application/json" \-H "Authorization: Bearer metorial_sk_..." \-d '{"tool_id": "example_tool_id","input": {},"metadata": {}}'