Skip to main content
Glama

Prepare a Foundry action

helix_foundry_prepare_operation

Check a Foundry action and return a one-time confirmation for exactly that action, valid for five minutes; helix_foundry_execute_operation runs it. Preparing changes nothing. A create_ontology on workspace: makes the ontology's database first, and its project when new.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "operation": "<operation>",
      "target": "<target>",
      "payload": "<payload>"
    },
    "name": "helix_foundry_prepare_operation"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYescreate_ontology: tenant:<database id> for an existing database, or workspace:<workspace_id> for a new one. create_event_source: workspace:<workspace_id>. sync_connector: connector:<workspace_id>/<connector_id>. create_dashboard and create_workflow: workspace:<workspace_id>; the other dashboard operations: dashboard:<workspace_id>/<dashboard_id>; the other workflow operations: workflow:<workspace_id>/<workflow_id>. Every other operation: ontology:<workspace_id>/<ontology_id>.
payloadYesEach operation's payload: - create_ontology: {name} on tenant:<id>. On workspace:<id>, {name, database: {name, slug, project_id or project_name}} first makes a database on the shared cluster in that project, or in a new project of that name, and needs a Helix subscription. Names are 1 to 120 characters; a slug is lowercase letters, digits and single dashes, at most 63, given a short random suffix if another database has it. The database's key is never returned. - create_event_source: {name, description, text_field}: an API source (connector kind events) that people and agents send JSON pieces to with helix_foundry_send_pieces. name is 1 to 120 characters, unique among the workspace's API sources; description, at most 1000 characters, says what each piece is; text_field (optional, 1 to 64 bytes, not id, received_at or occurred_at) is the top-level field holding each piece's text, locked as a string, for entity extraction to read. Returns the source, its token_url (where a person makes a send token: no tool returns one) and the send tool. - add_sample_data: {}: adds the made-up Acme Corp sample company to the workspace, as Foundry's own sample does: a read-only PostgreSQL connector "Acme Corp" to its six tables, whose sync it queues (its login never passes through you), and its 9 documents in the document set "Acme Corp sample"; what the workspace already has of it is kept. Name the ontology "Acme Corp customers" for Foundry to show it as the sample, then generate it with sample "acme". The draft calls no model, but loads read the documents with the workspace's model, so adding them is refused (FOUNDRY_AI_NOT_CONFIGURED) on a local install with no AI provider. - sync_connector: {}. An API source syncs when pieces arrive, so it needs none. - generate_ontology: {goal, connector_ids, document_set_ids, no_connectors, event_sources, sample}, each optional. No connector_ids reads every connector unless no_connectors is true; no document_set_ids reads no document set: list up to 20. A set's CSV, TSV, JSON, JSONL and Parquet files that have been read are tables, counted with the synced tables toward the 50 tables a generation covers (choose fewer past it); its Markdown, MDX, text, WebVTT transcripts and read PDFs are text the agent reads and loads extract (a PDF still being read is left out; a scan has no text). A generation needs at least one table, table file or set holding text. sample "acme" drafts the Acme Corp sample company from its connector, with its six tables synced, and its document set, as its one connector_ids and document_set_ids: a ready-made draft, in seconds and with no model. event_sources are the API sources to read, each {connector_id, mode}: connector_ids never names one, and no connector_ids reads none. Mode structured reads its table through mappings, and its pieces reach the graph when the ontology refreshes; it needs pieces synced into its table first. Mode extraction reads the source's newest 500 pieces as Markdown documents of its own set (one of the 20 sets; document_set_ids never names it), extracted as they arrive, about 1 cent a piece for each ontology that reads it; work no one started spends at most $5 a month on a source, within a share for all the workspace's API sources, and past that new pieces wait for next month or a load a person starts. It needs the source's text_field and a piece synced as a document (list_connectors' extraction.documents above 0). - answer_generation_questions: {generation_id, round, answers, use_defaults}: answers the round of questions a generation that needs_input waits on (helix_foundry_get_generation lists them, with its question_round, which round names) and carries it on from where the agent asked. answers are {question_id, options, text}, each question once: options are the labels of the options the user chose, as the question lists them, and text their own words (1 to 2000 characters). A question without options takes text alone; one of one option (multiple false) one option or text, not both; one with multiple one or more options, with text or without, or text alone. Ask the user, never answer for them: show each question with its options, the recommended one marked, and let them answer in their own words too. Every blocking question needs an answer unless use_defaults, which answers each question left out with its recommended answer (or leaves it to the agent); questions no one answers take those at the generation's answers_due_at. - set_current_version: {version_id, expected_current_version_id}: the current version as you read it, empty when there is none. - create_load: {version_id}. - set_current_load: {load_id}. - revise_version: {version_id, edits, dry_run}: 1 to 100 edits, each {put: {item_id, toml}} with the item's whole TOML (such as item rule.overdue) or {remove: {item_id}}; dry_run previews without storing a version. - upload_document: {set_id, name, size_bytes, sha256}: the file's name, ending .md, .markdown, .mdx, .txt, .json, .csv, .tsv, .jsonl, .ndjson, .parquet, .pdf or .vtt; its exact size (at most 1 MiB for Markdown, MDX, text and WebVTT and 3 MiB for the rest, unless the stamp says otherwise); and its lowercase hex SHA-256. Then PUT the bytes to the upload URL it returns and call helix_foundry_complete_document_upload. Ontologies read Markdown, MDX and text as text; a WebVTT transcript (a meeting's or call's .vtt) as its turns, a line each with its start, speaker and words; a PDF as its text once Helix has read it (at most 150 pages; an encrypted or damaged PDF, or a scan with no text layer, stays stored unread); and CSV, TSV, JSON, JSONL and Parquet each as a table once read. The document's read says how and when. - create_document_set: {name, description}. - update_document_set: {set_id, name, description}, name and description each optional. - move_document: {document_id, set_id}. - settle_review: {review_id, decision}: the review_key of a review the current load holds (helix_foundry_list_reviews), and the decision its settle names: resolve {resolve: {entity_key}} with one of its candidates or {resolve: {not_in_data: true}}; prop {prop: {text|integer|number|boolean: value}} (an integer as a string of digits) or {prop: {null: true}} to remove the property; release {release: {statement_hash}} to approve the statement it holds back or {reject: {statement_hash}} to say it is wrong, with its statement_hash. A resolve, a release and a prop apply to the current load at once (helix_foundry_list_review_decisions's applied says what became of each): a resolve that chooses an entity also links that name to it in every document of that load where the load would otherwise ask, and not_in_data applies to the review's document only; a resolve of a name the load already links another way applies from the next load. A reject is sent to no load. - create_dashboard: {name, description, spec}: a dashboard of the workspace, unpinned, which every member sees and reads as themselves; a name of 1 to 120 characters, a description of at most 1000, and a spec (none for no tiles yet). Preview each tile with helix_foundry_preview_dashboard_tile first. A spec is {"v": 1, "tiles": [...], "layout": {"rows": [["t1", "t2"], ["t3"]]}}: at most 20 tiles, each in exactly one row of 1 to 3. A tile is {"id": "t1" (1 to 32 lowercase letters, digits, - or _, starting with a letter or digit), "title": 1 to 80 characters, "ontology_id", "load": {"kind": "current"} (whichever load is current when it is viewed) or {"kind": "pinned", "load_id"}, "query": a typed query, the query read of helix_foundry_read_graph (helix_foundry_read_guide gives its schema): at most 200 rows or 100 groups, "visual": {"kind": "table" | "bar" | "line" | "figure"} or {} to show it as its output suits}. An answer's visual (helix_foundry_ask's) is a tile already: its question's queries[].query with the visual's kind and title. - update_dashboard: {expected_revision, name, description, spec}: the revision helix_foundry_get_dashboard gave and at least one change, spec the whole new spec. Its creator changes a dashboard that isn't pinned; owners and admins change any. - delete_dashboard: {}: deletes the dashboard and its public link. Its creator deletes a dashboard that is neither pinned nor published; owners and admins delete any. - pin_dashboard: {expected_revision, pinned}: the revision helix_foundry_get_dashboard gave, and true to pin the dashboard in every member's sidebar, false to unpin it. Owners and admins only. - publish_dashboard: {expected_revision, expires_in_days}: optional, for people outside the workspace only: to share a dashboard inside it, give its url, which every member opens and reads as themselves, live. Publishing reads every tile as you and keeps their outputs as a snapshot at a public link, which anyone who has it sees with no sign-in, unchanged until it is published again, until it is unpublished or expires; publishing again refreshes the snapshot at the same link, or makes a new link once the old one expired. expires_in_days 7, 30 or 90 ends the link that many days from now, 0 never; left out, a live link keeps its own, a first one never ends, and one that expired is refused (FOUNDRY_DASHBOARD_LINK_EXPIRED: ask the person when the new link should end). Owners and admins only (else FOUNDRY_DASHBOARD_PUBLIC_ADMIN_ONLY), while the workspace has public links on (else FOUNDRY_DASHBOARD_PUBLIC_OFF): say plainly that anyone with the link sees the data as you see it. No tool returns the link: its page in Foundry shows owners and admins. - unpublish_dashboard: {}: deletes the public snapshot, so its link shows nothing, whether or not public links are on. Owners and admins only (else FOUNDRY_DASHBOARD_PUBLIC_ADMIN_ONLY). - create_workflow: {name, description, spec}: a workflow of yours, run as you, which waits for you to approve it in Foundry (its url) before it ever runs: say so, and that its page shows each step and what it may do unasked. A name of 1 to 120 characters, a description of at most 1000. A spec is a graph: {"v": 1, "nodes": [...], "edges": [{"from", "to", "branch"}]}, at most 50 nodes and 100 edges. A node is {"id": 1 to 32 lowercase letters, digits, - or _, starting with a letter or digit, "kind", "config", "position": {"x", "y"} (where the canvas draws it)}. Exactly one node is the trigger, with no edge in; every other node is reached from it, with no cycle. Kinds and their configs: trigger {"kind": "schedule", "every": "hour", "minute": 0-59, "time_zone"} | {"kind": "schedule", "every": "day", "at": "HH:MM", "time_zone"} | {"kind": "schedule", "every": "week", "weekday": "monday" … "sunday", "at": "HH:MM", "time_zone"} (an IANA zone, such as Europe/London: the person's) | {"kind": "sync_finished", "connector_id", "outcome": "succeeded" | "failed" | "any"} | {"kind": "load_ready", "ontology_id"} | {"kind": "document_arrived", "set_id"} | {"kind": "generation_finished", "ontology_id", "outcome"} | {"kind": "reviews_waiting", "ontology_id", "at_least": 1 to 10000} | {"kind": "manual"}; assistant {"instruction": 1 to 2000 characters, run as a Founder turn as the owner, "allow": up to 10 actions it may run unasked (anything else it prepares waits for the owner)}; action {"operation": "sync_connector", "connector_id"} | {"operation": "create_load", "ontology_id"} (its current version) | {"operation": "publish_dashboard", "dashboard_id"} (refresh its public snapshot); condition {"check": "answer", "equals": "yes" | "no"} (of the Founder step before it, which ends by reporting a yes or no) | {"check": "count", "op": "at_least" | "at_most" | "equals", "value"} (of the documents that arrived, the rows a sync wrote, the cards to review, or a Founder step's reported count), with exactly one edge in and its out edges each "branch": "true" or "false"; notify {"message": at most 500 characters}: emails the owner, with what the Founder steps before it said. A reviews_waiting trigger fires when the ontology's current load has at least that many review cards open, once its reviews are sorted, and again only for a new current load or after the count fell below it and rose past it. A step runs once every step before it ended and one of its edges in was taken; a failure stops the steps after it. A step may not sync or load what its trigger waits on (a sync_finished trigger's connector, a load_ready or reviews_waiting trigger's ontology, or the connector whose syncs write a document_arrived trigger's set): each run would start another. A trigger skips work its own workflow started (a sync, a load, or documents a sync it started wrote), directly or through other workflows, and work past a chain of 3 workflows, recording the run skipped and why. - update_workflow: {expected_revision, name, description, spec}: the revision helix_foundry_get_workflow gave and at least one change, spec the whole new spec. Only its owner changes one; a changed spec stops it until they approve it again in Foundry. - pause_workflow: {}: stops its runs until it is resumed; a run going on finishes. Its owner, or an owner or admin. - resume_workflow: {}: runs it again when its trigger fires, from now. Its owner only, once approved. - delete_workflow: {}: deletes it and its runs, cancelling a live one. Its owner, or an owner or admin. - run_workflow: {}: runs its approved spec now, as its owner: its owner only, while no run of it is live.
operationYesThe action to prepare; payload says what each takes.

Output Schema

NameRequiredDescriptionDefault
expires_atYes
payload_hashYes
confirmation_idYes
confirmation_tokenYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false and destructiveHint=false, so the safety profile is partly covered. The description adds real value beyond that: the confirmation is one-time, tied to exactly one action, and expires in five minutes. There is mild tension between 'Preparing changes nothing' and readOnlyHint=false (a token is still written), but it reads as a clarification of data-level effects rather than a contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences with the core behavior and the execute handoff front-loaded. The trailing create_ontology sentence is slightly cryptic and duplicates detail already in the schema, so it earns its place only marginally.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 27-operation tool with a 100%-covered schema and an output schema, the description covers the essentials: non-mutation, the five-minute one-time confirmation, and the sibling that executes it. It leaves the confirmation's exact shape to the output schema, which is appropriate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the payload description exhaustively documents all 27 operations. The description's one parameter-related sentence ('A create_ontology on workspace:<id> makes the ontology's database first, and its project when new') restates schema content rather than adding meaning, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and behavior: checks a Foundry action and returns a one-time confirmation bound to exactly that action, valid five minutes. It also names the sibling that consumes the confirmation (helix_foundry_execute_operation), so an agent can distinguish prepare from execute without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The prepare-then-execute handoff is explicit ('helix_foundry_execute_operation runs it'), and 'Preparing changes nothing' signals it is safe to call. It does not state when-not-to-use or what happens if the five-minute window lapses, but the core usage context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources