tool
derive_graph
Infer a data-free recipe (entity types, relationships) from a real sample file. Pass the file as base64. Use before generating relationship-preserving…
Last updated 2026-09-13 · Generated from mcp-schemas/tools/02-derive_graph · Markdown
Summary
Infer a data-free recipe (entity types, relationships) from a real sample file. Pass the file as base64. Use before generating relationship-preserving synthetic data.
Agentcalls
derive_graphDraft a recipe
Resultas data
Inputs and outputs
Goes in
- file_base64 (string, required) — see the input schema
- format (string) — see the input schema
When to call it
Infers structure from a real file and returns a recipe carrying no values. That is the point: you can hand the result to someone who is not allowed to see the original data.
Pass the file base64-encoded. Supported formats: csv, xlsx, json, xml.
Example request
{
"_comment": "A two-row CSV, base64-encoded.",
"name": "derive_graph",
"arguments": {
"file_base64": "Y3VzdG9tZXJfaWQsbmFtZSxlbWFpbCxhbW91bnQKMSxBZGEgTG92ZWxhY2UsYWRhQGV4YW1wbGUudGVzdCwxMjAuNTAKMixBbGFuIFR1cmluZyxhbGFuQGV4YW1wbGUudGVzdCw5OS4wMAo=",
"format": "csv"
}
}A string argument that holds JSON is shown unescaped here; send it as a string.
Example response
{
"contract_version": 3,
"$schema": "https://theworklens.com/schema/recipe/v1.json",
"version": 1,
"project": "derived",
"entities": [
{
"name": "Record",
"rows": 2,
"fields": [
{
"name": "customer_id",
"type": "id",
"sensitivity": "linked",
"generate": "fake",
"unique": true
},
{
"name": "name",
"type": "person.fullName",
"sensitivity": "pii",
"generate": "fake"
},
{
"name": "email",
"type": "internet.email",
"sensitivity": "pii",
"generate": "fake"
},
{
"name": "amount",
"type": "float",
"sensitivity": "safe",
"generate": "keep"
}
]
}
],
"relationships": [],
"output": {
"format": "csv"
},
"scenarios": [
{
"name": "happy"
},
{
"name": "nulls",
"null_rate": 0.15
},
{
"name": "boundary",
"mode": "boundary"
}
]
}Same step
get_recipe_schemaThe recipe (GraphModel) authoring guide: JSON shape, every engine field type, FK conventions, rules and a working example. Call this FIRST, WITH A plan of what you are about to build (output csv or fixed, the constructs you expect, region, whether you are reading a repository): the reply then carries exactly what…analyse_openapiAnalyse an OpenAPI 3.x / Swagger 2.0 spec (JSON string) and preview what a WorkLens import would produce: object entities with field counts and ref lists, inlined value-types, and cross-entity foreign keys. Use before recommending an import. Standalone entities are marked defaultSelected:false so a checklist can…Tool directoryAll 13 tools, grouped by step.
Related
Tool directoryAll 13 tools the WorkLens MCP server exposes, grouped by the step they belong to, generated from the published contracts.get_recipe_schemaThe recipe (GraphModel) authoring guide: JSON shape, every engine field type, FK conventions, rules and a working example. Call this FIRST, WITH A plan of…analyse_openapiAnalyse an OpenAPI 3.x / Swagger 2.0 spec (JSON string) and preview what a WorkLens import would produce: object entities with field counts and ref lists,…