Dataset
Tool calling datasets from production API traces for AI training
A tool calling dataset is an ordered record of the calls made to tools and APIs in production by deployed agents, integrations and the people operating them: the tool schema offered, the arguments sent, the response or error returned, timing, retries and the final result of the task. SourceX sources these traces to a buyer's spec from established businesses that run agents or automation and keep the calls in their observability and gateway logs. Each dataset is de-identified, with secrets removed and customer values replaced, and licensed for an agreed permitted use.
Dataset manifest
Sourced to your spec- What it is
- Ordered tool and API calls with schemas, arguments, responses, errors, retries and the task result
- Typical systems
- OpenTelemetry trace stores, Langfuse, LangSmith, MCP server logs, API gateways such as Kong and Apigee
- Typical history
- Specified by the buyer; limited by the operator's trace retention and sampling
- Modality
- Structured call records with JSON payloads and short text
- Delivery formats
- Agreed per order; commonly JSONL spans grouped by trace, with tool definitions as JSON Schema or OpenAPI files
- Preparation
- Secrets and tokens removed; customer values tokenized consistently so they still chain between calls
- Licensing
- Rights reviewed for the operator's logs, the model provider's terms and third-party API terms
- Availability
- Sourced to your spec from operators that log payloads and may license them; supply is not guaranteed
What a delivery contains
Fields vary by source system and are fixed per order. A typical delivery includes:
| Field | Type | What it holds |
|---|---|---|
| trace_id | string | ID of one task run, carried by every call, retry and model turn in it. |
| call_seq | integer | Order of the call within the trace, with the parent span for calls made inside another call. |
| caller | object | Who issued the call: an LLM agent with its model version, a scheduled integration, a webhook handler or a person at a console. |
| tool_def | object | Tool name, description and parameter schema exactly as offered on that request, with a content hash. |
| api_version | object | Version of the API or tool server that answered, from the version header, spec file or server handshake. |
| arguments_raw | string | The argument payload as emitted, before parsing, including text that is not valid JSON. |
| validation | object | Whether the arguments parsed and matched the schema, with each violation listed. |
| response | object | Status, redacted body, a truncation flag and whether the model was shown the result whole or shortened. |
| error_class | enum | Malformed arguments, schema violation, expired auth, permission denied, rate limited, not found, conflict, timeout or server error. |
| timing | object | Start time, latency and time spent queued behind a rate limiter. |
| retry | object | Links a call to its repeats: the call it repeats or is repeated by, the attempt number and whether the idempotency key was reused. |
| value_origin | array | For each argument, where its value came from: the user request, a named field of an earlier response or nothing traceable. |
| task_result | object | How the task ended and the evidence: a record in the system acted on, a human confirmation or only the agent's claim. |
| payload_redaction | object | Secrets removed, fields tokenized and the scope within which one value keeps one token. |
Field names from the table above; values are masked placeholders.
Example record
{
"trace_id": "tr_5f0c9a1e",
"call_seq": 4,
"caller": { "kind": "llm_agent", "agent": "billing-assist", "model_reported": "[MODEL_SNAPSHOT_ID]" },
"tool_def": {
"name": "create_refund", "hash": "sha256:[HASH]",
"parameters": { "type": "object", "required": ["charge_id", "amount", "reason"],
"properties": {
"charge_id": { "type": "string" },
"amount": { "type": "integer", "description": "Amount in cents" },
"reason": { "type": "string", "enum": ["duplicate", "damaged", "not_received", "other"] } } } },
"api_version": { "source": "request_header", "value": "2024-11-01" },
"arguments_raw": "{\"charge_id\": \"ch_tok_81f3\", \"amount\": 49.5, \"reason\": \"damaged\"}",
"validation": { "parsed": true, "schema_valid": false,
"violations": [ { "path": "amount", "rule": "type", "expected": "integer", "got": "number" } ] },
"response": { "status": 422, "shown_to_model": "full", "truncated": false,
"body": { "error": "invalid_request", "param": "amount", "message": "amount must be an integer in cents" } },
"error_class": "schema_violation",
"timing": { "start": "2025-04-09T13:41:07.212Z", "latency_ms": 96 },
"retry": { "attempt": 1, "repeated_by_seq": 5, "idempotency_key_reused": false },
"value_origin": [
{ "arg": "charge_id", "from": "response", "seq": 3, "json_path": "$.charges[0].id" },
{ "arg": "amount", "from": "response", "seq": 2, "json_path": "$.lines[1].unit_price" },
{ "arg": "reason", "from": "user_request" }
],
"task_result": { "status": "completed_after_retry", "evidence": "refund_record_exists" },
"payload_redaction": { "secrets_removed": ["authorization_header"], "tokenized": ["charge_id", "email"], "scope": "dataset" }
}Synthetic record for illustration. Field names, structure and format are agreed per order.
What AI teams use it for
Fine-tune function calling on real arguments
Calls with production values teach formats, units and required-field habits that a schema alone does not convey.
Train recovery from tool errors
A refused call followed by the corrected one, or by a wait and retry, is a worked example of error handling.
Build multi-step tool-use evaluations
Chains with a known task result can be replayed against the recorded responses to score a new model step by step.
Train tool selection among many tools
Production registries often hold overlapping tools, and traces show which one was chosen for a request.
Build API mocks for agent sandboxes
Recorded request and response pairs, errors included, seed simulators that answer like the real service.
Use-case guides: Enterprise and computer-use agents, Private evaluation sets, Coding agents, Customer support agents
What makes this data valuable
Payloads logged
Arguments and response bodies retained, where gateway access logs often keep only method, route, status and latency.
Versioned tool definitions
Each call resolves to the name, description and schema offered at that time.
Failures kept
Malformed, refused, rate-limited and timed-out calls present and classified, not filtered out.
Linked spans
Trace and parent IDs joining model turns, tool calls and the downstream HTTP requests they caused.
Outcome evidence
A task result backed by a record in the system acted on, not only the agent's last message.
Consistent tokens
One replaced value keeps one token across arguments and responses, so chains still connect.
Agent run
Tool calling dataset
The value is in real arguments and the calls that failed
Synthetic function-calling sets are typically made by writing a schema, asking a model for a plausible request and asking it again for the call. The calls that survive filtering parse, the arguments sit on the easy path and the response is imagined. Production differs in the values. A customer ID had to come from an earlier search result. The API wants epoch seconds and the user said last Tuesday. An amount is expected in the smallest currency unit. The schema says what is allowed, and only real traffic shows what gets sent.
Failures come in layers, and each is logged in a different place. Some calls never form: in the widely used chat-completions style of function calling the arguments arrive as a JSON string the model wrote, which can fail to parse or name a parameter the schema never defined when strict schema enforcement is off. Some calls are refused: a validation error, a permission the role lacks, an expired token, a conflict on a stale record, a rate limit. The Model Context Protocol reports an unknown tool as a protocol error and a tool that ran and failed as a normal result flagged isError, so a logger that keeps one channel loses the other. And some calls succeed against the wrong record, which only the task result reveals.
What follows a failure is the training signal: the caller fixes the argument, waits and retries, retries at once and is limited again, switches tools, or tells the user it worked. Rate limits and permission errors are hard to stage faithfully in a sandbox, because they depend on real quotas and roles. Check where retries were captured. An HTTP client that retries by itself shows the agent one slow success, while the gateway log holds every attempt.
A trace needs the tool definitions and versions that were live
A logged call is right or wrong only against the definition offered at that moment. Teams rewrite tool descriptions to steer the model, rename parameters, extend enums and split one tool into two. Many logging setups keep the messages and the calls but not the list of tools sent with the request, or keep one current registry with no history. With the Model Context Protocol the client fetches the list from the server at runtime, and the server can announce that it changed, so the definition need not be in the client's code at all. The API behind the tool has versions too, and arguments valid in one can be rejected in the next.
Chains are worth more than single calls. One call tests whether a model can fill a schema from a sentence. A real task searches for the customer, reads the orders, picks the line, creates the refund and posts a note, and each argument comes from an earlier response. Those edges, this argument from that field of that response, are what teach planning. Chains also show branching, such as an empty result that widens the query, and calls issued in parallel in one model turn and matched back by call ID.
Preparation can cut a chain. If an ID in a response is replaced with one token and the same ID in the next call's arguments with another, the model learns to invent IDs, so tokenization has to be consistent across the dataset. Large responses are often shortened before the model sees them, and the record should say which version it saw. Rights follow the payloads and are yours to check with counsel: a third-party API's terms may limit what can be done with its responses, and the model provider's terms may reach the arguments the model wrote.
What to check before licensing
- Search arguments, headers and response bodies in the sample for bearer tokens, API keys, signed URLs and connection strings. Confirm anything found live was rotated.
- Ask which model provider produced the logged outputs and which third-party APIs returned the responses, and have counsel check that each set of terms allows them to be licensed for your use.
- Check that each call resolves to the tool definition offered at that time. If every call across several months points at one definition, history was not kept.
- Count calls by error class and ask what was filtered or sampled. A sample with no malformed, rate-limited or permission-denied calls has been cleaned.
- Ask where retries were captured: in the agent trace, the HTTP client or only the gateway log.
- Follow one multi-call trace by hand. Every ID passed as an argument should appear, under the same token, in an earlier response or in the user's request.
- Ask how the task result was established: a record in the system acted on, a human confirmation or the agent's own final message. Treat the last as unverified.
Delivery No files move before a signed license. A listing or a request grants no files by itself.
How licensing works through SourceX
- 1
Define
Send the domain, modality, volume, format, timeline and permitted use you need.
- 2
Source
SourceX identifies businesses that hold matching data and are open to licensing it.
- 3
Qualify
Fit, rights and quality are checked, and you review samples before committing.
- 4
License
Scope, permitted use, exclusivity, price and obligations are agreed in writing.
- 5
Deliver
Approved data is prepared, de-identified where required and transferred securely.
Questions Acquisition Partners ask
How is this different from synthetic function-calling data?
The calls were made in production against real systems, so the argument values, the errors and the responses are what actually happened. Synthetic sets typically pair a schema with a model-written request and an imagined result, which tends to leave out malformed arguments, rate limits, permission errors and chains where one response feeds the next call.
Do traces include the tool schemas?
Only where the operator logged them or kept a versioned registry, so make it a requirement in your request. A call without the definition offered at the time cannot be judged. Ask for the name, description and parameter schema as sent with each request, or a content hash that resolves to a stored definition, plus the API version in force.
Are failed calls included?
They can be, where the operator kept them, so say what mix you want. Operators often filter or sample traces, and cleaned exports drop malformed, refused and timed-out calls first. Specify the error classes to keep and whether retries must be linked to the calls they repeat.
Do the callers have to be LLM agents?
No. The same tools and APIs are called by scheduled integrations, webhook handlers and people working through a console, and each record is labeled by caller kind. Calls by integrations and operators show correct use of an API under real conditions. Calls by agents show how models misuse it and recover. Specify which you need.
How are secrets and customer data removed from payloads?
Secrets have to be removed and customer values replaced with consistent tokens before delivery, and you should scan the sample yourself. Check that authorization headers, API keys and session cookies are stripped, and that names, emails and account numbers in arguments and responses are tokenized so one value keeps one token across a trace. No method is perfect, so the method used is recorded for each dataset.
What format are traces delivered in?
The format is agreed per order and usually follows how the operator stored the traces. A common layout is JSONL with one span per line, grouped by trace ID, with tool definitions as JSON Schema or OpenAPI files. If you train on a particular tool-call message format, name it so the mapping is agreed up front.
Related datasets
- Coding agent session traces on private repositories
Session logs of AI coding agents on private repositories, joined to the human verdict on each result
- Enterprise workflow and task execution histories
Linked task trajectories from request to outcome, across every tool the work touched
- RPA bot logs and process definitions
Bot workflow files with selectors, branches and handlers, joined to queue items, job runs, logs and published versions
- LLM chat logs with user feedback
Human-to-assistant conversations with the model's inputs and the user's reaction to each answer
- Browser task trajectories with DOM state
Ordered steps of employees doing real tasks in web apps, each paired with the DOM, accessibility tree, URL and network calls
Evaluating this data for procurement?
Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.
Request dataset diligenceTell us what your models need
Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.
Updated 25 November 2026.