MCP tool reference
Every tool the Data MCP server registers, read from the server's own registration list so this page cannot describe a tool an agent is not actually served. These are the platform tools — generic operations over bases, record types, records, relationships, files and triggers.
Connect an MCP client to https://data-mcp.wayai.pro/mcp with your API token as the bearer credential. That endpoint serves exactly the tools below.
A base can also publish its own purpose-built toolset, served at a different address (https://data-mcp.wayai.pro/t/<slug>/mcp). Its tools are named for your domain (create_invoice, list_payments) and are defined by you, so they do not appear here. Types below are written as the schema declares them, and a parameter marked required must be sent on every call.
manage_base
Manage bases. Actions: create, get, list, delete, create_preview, list_previews. Start here to discover existing bases before operating. Note: schema changes (record_types, triggers, inbound webhooks) can only be made in preview bases. Use create_preview to clone a base's config into a new preview — the origin may be a production base OR another preview — then promote via CLI. A preview cloned from a preview promotes through its origin, not straight to production, and is created on the 'local' analytics tier, where get_change_history and query_relationships refuse and sql_query refuses any query over records, relationships or audit_log (the schema tables still answer) — see the analytics parameter, which is fixed at creation. Environment is fixed for the life of a base and cannot be changed on a live one — but it is not welded to the id: once a base's data has been permanently destroyed and that deletion completes, the id is free and can be created again in EITHER environment. So a preview you prototyped on can become the production base under the same slug, after purging it and waiting for the deletion to finish. For a base meant to LAST, still create it as production first and use create_preview for a linked preview to do config work in and promote from; create directly with environment 'preview' for ephemeral or eval bases under a derived id.
Parameters
action—"create" | "get" | "list" | "delete" | "create_preview" | "list_previews", required.base_id—string, optional. Required for create, get, delete, create_preview, list_previewsname—string, optional. Required for create and create_previewdescription—string, optional.create_only—boolean, optional. create_preview only. Fail if the derived preview id already exists, instead of re-applying config onto it. Use for throwaway per-run bases.purge—boolean, optional. delete only, preview bases only. Permanently destroy the base's stored records, relationships, file metadata and config instead of tombstoning it. Without this, delete retains everything and recreating the id restores it. A purged id is retired while the deletion finishes — recreating it is refused until then — and frees itself once it completes. The deletion runs in the background, so derive a fresh id per run rather than waiting for the old one; a token scoped to the purged base never carries over to whatever is created on that id later.analytics—"standard" | "local", optional. create_preview only. A clone of a PREVIEW origin defaults to 'local': its records stay in the base itself, so get_change_history and query_relationships return 409 ANALYTICS_LOCAL on it, as does any sql_query over records, relationships or audit_log (queries over the schema tables still answer). A clone of a production origin defaults to 'standard'. Pass 'standard' when the clone needs those tools — the tier is fixed for the life of a base and cannot be changed on one that exists (a base recreated on a permanently-deleted id is a new base and may choose again).environment—"production" | "preview", optional. create only. Defaults to production, and cannot be changed on a base that exists — a preview only becomes production by destroying its data first (delete with purge) and creating the id again once that deletion completes. Take the default for anything durable, then create_preview for a linked preview to work in; pass 'preview' here only for an ephemeral or eval base under a derived id. On a RECREATE of a freed id, omitting this keeps the previous environment rather than defaulting to production, so state it explicitly when you mean to change it.
manage_record_type
Manage record_type schemas. Actions: upsert, get, list, delete. Use list to discover what record_types exist in a database.
Parameters
action—"upsert" | "get" | "list" | "delete", required.base_id—string, required. Target database IDrecord_type_id—string, optional. Required for upsert, get, deletename—string, optional. RecordType display namedescription—string, optional.icon—string, optional.color—string, optional.json_schema—object, optional. JSON Schema object defining the record_type structuresources—object[], optional. External source configs. Each source defines endpoints, auth, and field mapping for proxying operations to an external API.
manage_record
Create, read, update, patch, delete, or cancel individual records. 'upsert' (PUT) writes the FULL record — send every field; supply external_id (and optional external_source) for idempotent writes from external systems (the internal UUID is auto-generated). 'patch' is a PARTIAL update — send only the fields you want to change and the rest are kept (top-level merge; nested objects replaced wholesale). Use patch to flip a status or set a flag without re-sending the whole record; it addresses an existing record by record_id or external_id and 404s if none exists. (For a record_type backed by an external source, the provided fields are forwarded to that upstream system, which decides how they are applied.) Use record_id (internal UUID) for get/delete/cancel or to address a known record. Records may be archived (_archived: true in response) — an archived record stays readable and can still be cancelled, but it cannot be deleted, and re-upserting by the same external_id creates a new record rather than updating the archived one. Keep record data small (structured JSON only) — store binary or large content (PDFs, images, files) as an attachment via manage_attachment and reference it from the record; oversized payloads are rejected.
Parameters
action—"upsert" | "patch" | "get" | "delete" | "cancel", required.base_id—string, required. Target database IDrecord_type—string, required. RecordType name or IDrecord_id—string, optional. Internal record ID (UUID). Required for get/delete. For upsert/patch, use to address a known record by internal ID.external_id—string, optional. External/agent-supplied ID for upsert/patch. Enables idempotent writes by external identity (e.g. stripe_inv_123).external_source—string, optional. Source system for external_id (e.g. 'stripe', 'salesforce'). Scopes uniqueness of external_id.data—object, optional. For upsert: the full record. For patch: only the fields to change. Structured JSON only — use manage_attachment for binary/large content (PDFs, images, files).
query_records
List and search records in a record_type. Supports exact filtering, fuzzy text search, sorting, and pagination via the Filter DSL. Use the search operator on a field to match approximate values when you don't have the exact stored string (e.g. {"field":"data.car_model","op":"search","value":"honda civic"}); results come back ranked by closeness with a _search_score. Combine search with exact operators (eq/in/gte/...) in the same filter to narrow first, then rank.
Parameters
base_id—string, required. Target database IDrecord_type—string, required. RecordType to queryexternal_source—string, optional. For a record_type backed by an external source, the source name to list from (rows live in that upstream). Omit for native record_types.filter—object, optional. Expected the Filter DSL: a condition {"field":"data.<field>","op":"<op>","value":<value>} or an and/or group {"and":[...]} / {"or":[...]}. Operators: eq, neq, gt, gte, lt, lte, in, not_in, like, ilike, search, is_null, is_not_null, has. Example: {"field":"data.specialties","op":"has","value":"Cardiologia"}. Datetimes: pass an ISO-8601 value (e.g. "2026-06-11T13:00:00-03:00", "...Z", or "2026-06-11 13:00:00"). eq/neq/in/not_in and gt/gte/lt/lte match datetimes by instant, so the exact representation (T vs space, with/without offset) does not affect the result; a naive value with no offset is read in the record_type timezone. Use eq for an exact datetime (not like, which is substring-only). ilike is case- and accent-insensitive and supports SQL %/_ wildcards; like remains case- and accent-sensitive. Lists return active records by default (archived excluded); add a condition on "archived" (e.g. {"field":"archived","op":"eq","value":true}) to query archived records instead. Mongo-style filters (e.g. {"data.field":"value"} or {"field":{"$in":[...]}}) are NOT supported.sort—object[], optional. Expected a JSON array of sort terms: [{"field":"data.<field>","direction":"asc"|"desc"}]. Example: [{"field":"data.created_at","direction":"desc"}]. A shorthand string like "data.name:asc" is NOT supported. Omit when usingsearchto rank by relevance.fields—string[], optional. Projection — return only these fields (plus _search_score when searching)limit—number, optional.offset—number, optional.
sql_query
Execute a read-only SQL query against database data. Tables: records, relationships, record_types, relationship_types, bases, operations_log, organization, audit_log. Always include BOTH org_id = {org_id:String} AND base_id = {base_id:String}, plus deleted = false, in WHERE (a database id is per-org, not globally unique, so org_id is required to isolate your data). Exceptions: audit_log and operations_log are append-only and have no deleted column, so omit deleted = false for them. bases, operations_log and organization have no base_id column, so bind {base_id:String} to the column that identifies the base: on bases use id = {base_id:String}, on operations_log use data.base_id.:String = {base_id:String}. organization is org-level with no per-base row and cannot be served by this base-scoped endpoint at all; it is readable only from the org-wide SQL surface, and only by a credential granted access to EVERY database in the org — a credential scoped to named databases is refused there, so for it organization is not readable at all; its plan and status columns are not maintained and are not an entitlement, so do not read a billing tier out of them. Keep org_id = {org_id:String} in every case. audit_log (change history) is admin-only — platform admins, or a token granted read:audit. Queries return the latest version of each row automatically.
Parameters
base_id—string, required. Target database IDquery—string, required. SELECT SQL query. Both {org_id:String} and {base_id:String} are auto-injected server-side; includeorg_id = {org_id:String} AND base_id = {base_id:String}anddeleted = falsein WHERE.params—object, optional. Additional named parameters for {param:Type} placeholders
manage_relationship
Create, read, update, or delete relationships between records. Relationships are typed, directed links with optional metadata.
Parameters
action—"upsert" | "get" | "delete", required.base_id—string, required. Target database IDrelationship_id—string, optional. Required for get/delete. Generated on upsert if omitted.rel_type—string, optional. Relationship type, e.g. 'invoice_to_contact'external_id—string, optional. The relationship's own external key (upsert only): a retried create with the same external_id updates the first row instead of duplicating it.external_source—string, optional. Source system scoping the relationship's external_id.source_record_type—string, optional.source_id—string, optional. Source record ID. On upsert provide this OR source_external_id (exactly one).source_external_id—string, optional. Address the source record by its external_id instead of its ID; the record must already exist.source_external_source—string, optional. Source system scoping source_external_id. Only meaningful with source_external_id.target_record_type—string, optional.target_id—string, optional. Target record ID. On upsert provide this OR target_external_id (exactly one).target_external_id—string, optional. Address the target record by its external_id instead of its ID; the record must already exist.target_external_source—string, optional. Source system scoping target_external_id. Only meaningful with target_external_id.data—object, optional. Metadata on the relationship
manage_relationship_type
Manage relationship types. A relationship type must exist before any relationship of that type can be created — it optionally validates the relationship's metadata against a JSON Schema and restricts which record_types it may connect. Actions: upsert, get, list, delete.
Parameters
action—"upsert" | "get" | "list" | "delete", required.base_id—string, required. Target database IDrel_type—string, optional. The relationship type id (rel_type). Required for upsert, get, deletedescription—string, optional.data_schema—object | null, optional. JSON Schema validating the relationship's data. Omit or null to allow any data.source_record_types—string[], optional. Allowed source record_types. Empty/omitted means any record_type.target_record_types—string[], optional. Allowed target record_types. Empty/omitted means any record_type.
query_relationships
Query relationships for a specific record. Find related records by type and direction.
Parameters
base_id—string, required. Target database IDrecord_type—string, required. RecordType of the source/target recordrecord_id—string, required. Record ID to find relationships forrel_type—string, optional. Filter by relationship typedirection—"source" | "target" | "both", optional. Direction: source (outgoing), target (incoming), bothlimit—number, optional.offset—number, optional.
manage_attachment
Manage file attachments on records. Filenames can include paths for folder structure (e.g. 'docs/guide.md', 'src/index.ts'). Upload returns a presigned URL — the agent uploads bytes directly.
Parameters
action—"upload" | "get_url" | "list" | "delete", required.base_id—string, required. Target database IDrecord_type—string, required. RecordType name or IDrecord_id—string, required. Record the attachment belongs tofilename—string, optional. Required for upload, get_url, delete. Supports paths (e.g. 'docs/guide.md')content_type—string, optional. MIME type, required for uploadprefix—string, optional. Filter list results by path prefix (e.g. 'docs/' to list only files in docs folder)
manage_file_type
Manage file types (Buckets) — the config for a set of files: storage policy + optional metadata schema. Actions: upsert, get, list, delete. Config writes require a preview database.
Parameters
action—"upsert" | "get" | "list" | "delete", required.base_id—string, required. Target database IDfile_type_id—string, optional. The file type id (slug). Required for upsert, get, deletename—string, optional. File type display namedescription—string, optional.max_size—number, optional. Max bytes per file; 0 or omit = unlimitedallowed_content_types—string[], optional. Allowed content-types; omit/empty = anymetadata_schema—object, optional. Optional JSON Schema validating each file's metadata
manage_file
Manage files (path-addressed, versioned content) within a file type. Actions: create (upload text content, mints a content version), get (metadata; ?version reads a retained one), list (by path prefix), move (rename), delete, history (list content versions), diff (compare two versions — metadata delta + text content diff). Binary uploads/downloads use the CLI or REST; this tool handles text content and metadata.
Parameters
action—"create" | "get" | "list" | "move" | "delete" | "history" | "diff", required.base_id—string, required. Target database IDfile_type—string, required. The file type idpath—string, optional. File path within the file type (e.g. notes/summary.md). Required for create/get/move/delete/history/diffcontent—string, optional. Text content to upload (create). For binary, use the CLI/REST.content_type—string, optional. MIME type of the content (create); defaults to text/plainmetadata—object, optional. Structured metadata (validated against the file type's metadata_schema)label—string, optional. Free-string tag for the content version this create mints (e.g. 'proposal 1')if_match—string, optional. content_sha256 compare-and-set: write only if the current content hash matchesnew_path—string, optional. Destination path for moveprefix—string, optional. Path prefix filter for listdepth—number, optional. Max folder depth below the prefix for list (1 = immediate children)version—number, optional. Read a specific retained content version (get); defaults to the latestfrom—number, optional. Base version number (diff)to—number, optional. Target version number (diff)limit—number, optional. Max results for list/historyoffset—number, optional. Pagination offset for list/history
manage_inbound_webhook
Manage inbound webhook endpoints. Inbound webhooks accept JSON and upsert through the normal write path; an optional mapping canonicalizes the received payload to the record_type's schema before write.
Parameters
action—"create" | "get" | "list" | "delete", required.base_id—string, required. Target database IDinbound_webhook_id—string, optional. Inbound webhook ID. Required for get, delete. Auto-generated for create if omitted.name—string, optional. Inbound webhook display namesecret—string, optional. Shared secret for HMAC verificationrecord_type_scope—string[], optional. Restrict which record_types this inbound webhook can write tofield_mapping—object, optional. Inline mapping applied to the payload before write: a field_mapping object — {to_external:{...}} renames auto-invert on read, or supply {to_record:{...}}/{computed:{...}}. Mutually exclusive with source_binding.source_binding—object, optional. Reuse a record_type source's field_mapping for the to_record translation: {record_type, source}. Mutually exclusive with field_mapping.
manage_trigger
Manage triggers. A webhook trigger fires a signed HTTP POST when records/relationships change; an internal_write trigger makes the base patch a referenced record itself (no executor); an external_write trigger writes the changed record out through an external source's write path (reusing its translation, endpoint, and auth) and links the upstream-assigned id back (no executor).
Parameters
action—"create" | "get" | "list" | "delete", required.base_id—string, required. Target database IDtrigger_id—string, optional. Trigger ID. Required for get, delete. Auto-generated for create if omitted.name—string, optional. Trigger display nameurl—string, optional. Webhook HTTPS endpoint (webhook triggers)secret—string, optional. Webhook HMAC signing secret (webhook triggers)action_config—object, optional. Polymorphic action. Webhook: {type:'webhook',url,secret}. internal_write: {type:'internal_write',target,match:{source_field,target_key?},patch,precondition?,mode:'async'|'transactional'} (mode 'async' applies after the triggering write; 'transactional' applies atomically with it so a precondition miss rolls the write back). external_write: {type:'external_write',record_type?,source,op?,link_external_id?,watched_fields?} — writes the changed record through that record_type's source ('record_type' defaults to the triggering record_type); 'op' defaults from the event (created→create, updated→update, deleted→delete); on a create the upstream-assigned id is linked back as external_id unless link_external_id:false. watched_fields scopes UPDATE dispatch to writes that changed an upstream-mapped field (skips a redundant push when only a base-owned overlay field changed): 'mapped' = the source's to_external keys, or an explicit array of data fields; omit to fire on every update. Takes precedence over url/secret.events—string[], optional. Events to fire on: record.created, record.updated, record.deleted, relationship.created, relationship.updated, relationship.deleted, file.created, file.updated, file.deleted (internal_write supports record.created/updated only; external_write supports record.created/updated/deleted only; file events are webhook-only)record_type_scope—string[], optional. Limit to specific record_typesfilter—object, optional. Only fire when record matches this filterskip_inbound_webhook_writes—boolean, optional. Skip firing on inbound-webhook-originated writes (default true)skip_cascade_writes—boolean, optional. Skip firing on cascade-originated (internal_write) writes (default true)
batch_operations
Execute multiple record, relationship, and record_type operations atomically. All operations succeed or all fail. Use for transactions, multi-entity writes, or any case where consistency between operations is required. Max 1,000 operations.
Parameters
base_id—string, required. Target database IDoperations—object[], required. Array of operations to execute atomically Tagged bytype:upsert_record,delete_record,upsert_relationship,delete_relationship,upsert_record_type,delete_record_type.
provider_adapter
Convert between LLM provider tool formats (openai, anthropic, google, mcp) and Record record_types. Actions: import_tools (create record_types from tool definitions), export_tools (export record_types as tool definitions), import_tool_call (create a record from a tool call in provider format).
Parameters
action—"import_tools" | "export_tools" | "import_tool_call", required.base_id—string, required. Target database IDprovider—"openai" | "anthropic" | "google" | "mcp", required. LLM provider formattools—object[], optional. Array of tool definitions in provider format (import_tools)record_type_ids—string[], optional. RecordType IDs to export (export_tools, omit for all)record_type—string, optional. Target record_type (import_tool_call)call_data—object, optional. Tool call data in provider format (import_tool_call)external_id—string, optional. External ID for idempotent upsert (import_tool_call)external_source—string, optional. External source identifier (import_tool_call)
get_change_history
Retrieve the change history (audit log) for a record, relationship, record_type, or relationship type — every version as a full snapshot, plus who changed it (actor), the operation (create/update/delete/cancel/archive), and when. Admin-only: platform admins, or a token explicitly granted read:audit; ordinary agent tokens receive 403.
Parameters
base_id—string, required. Target database IDentity_type—"record" | "relationship" | "record_type" | "relationship_type", required. The kind of entity whose history to readentity_id—string, required. The entity's ID (record/relationship UUID, or record_type/relationship_type id)limit—number, optional. Max results (newest first)offset—number, optional. Pagination offsetdiff—boolean, optional. Include field-level diffs between consecutive versions