Skip to main content
Glama
RawTree MCP Server

RawTree MCP Server

Official
by rawtreedb

Create Workflow

create-workflow
Destructive

Creates scheduled SQL workflows that run queries automatically and deliver results to HTTP, table, or Slack sinks. Configure cron schedules, pause execution, or set manual-only runs.

Instructions

Create a scheduled SQL workflow. Requires name and query (database and sql). Defaults: schedule={ cron: "* * * * * *", enabled: true }, sinks=[]. An enabled schedule starts recurring SQL execution and sink delivery; use schedule.enabled=false to create it paused, or schedule=null for manual-only. SQL may write rows through INSERT SELECT. Creation is not idempotent: reconcile an uncertain result with list-workflows before retrying. Returns the workflow object: id, name, description, query, schedule, revision, created_at, updated_at, and sinks. The query object contains database and sql. schedule is null for manual-only workflows; otherwise it contains cron, enabled, and next_run_at (null while paused). Each sink has id, type, and settings. HTTP settings contain url (null when unreadable), url_configured, and header_names; header values are never returned. Table settings contain database and table. Slack settings contain integration_id, channel_id, and channel_name, resolved from Slack when the sink was saved. Requires an admin API key bound to the selected organization and cluster, or OAuth. Organization members may read; organization admins may create, update, or delete. Workflows execute with organization credentials and continue after the creating key is revoked or expires.

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": {
      "organization": "<organization>",
      "cluster": "<cluster>",
      "name": "<name>",
      "query": "<query>"
    },
    "name": "create-workflow"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
queryYes
sinksNoUp to five sinks. Omit for none. New HTTP sinks require settings.url. Slack sinks post a summary and a preview of the result rows through an organization Slack integration from list-integrations. Give the channel as channel_name (such as "#alerts"), or as channel_id; search channels with list-slack-channels and name. A name is resolved to its channel ID on every save, and only the ID is stored. Each Slack sink must use a distinct integration and channel. All sink IDs are assigned by the API.
clusterYesRawTree cluster to use for this operation.
scheduleNoOmit for the default schedule, "* * * * * *" (every second), enabled. null creates a manual-only workflow. enabled defaults to true.
descriptionNoFree-form text. The API trims it and stores blank values as null.
organizationYesRawTree organization containing the target cluster.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.3
    • changedInput schema / properties / sinks / description
      Previous value: -"Up to five sinks. Omit for none. New HTTP sinks require settings.url; all sink IDs are assigned by the API."New value: +"Up to five sinks. Omit for none. New HTTP sinks require settings.url. Slack sinks post a summary and a preview of the result rows through an organization Slack integration from list-integrations. Give the channel as channel_name (such as \"#alerts\"), or as channel_id; search channels with list-slack-channels and name. A name is resolved to its channel ID on every save, and only the ID is stored. Each Slack sink must use a distinct integration and channel. All sink IDs are assigned by the API."
    • changedInput schema / properties / sinks / items / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "settings": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "headers": {
      -            "additionalProperties": {
      -              "type": "string"
      -            },
      -            "propertyNames": {
      -              "type": "string"
      -            },
      -            "type": "object"
      -          },
      -          "url": {
      -            "description": "Write-only sink URL. The API validates allowed origins.",
      -            "format": "uri",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "url"
      -        ],
      -        "type": "object"
      -      },
      -      "type": {
      -        "const": "http",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "settings"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "settings": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "database": {
      -            "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$",
      -            "type": "string"
      -          },
      -          "table": {
      -            "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "database",
      -          "table"
      -        ],
      -        "type": "object"
      -      },
      -      "type": {
      -        "const": "table",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "settings"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "settings": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "headers": {
      +            "additionalProperties": {
      +              "type": "string"
      +            },
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "url": {
      +            "description": "Write-only sink URL. The API validates allowed origins.",
      +            "format": "uri",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "url"
      +        ],
      +        "type": "object"
      +      },
      +      "type": {
      +        "const": "http",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "settings"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "settings": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "database": {
      +            "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$",
      +            "type": "string"
      +          },
      +          "table": {
      +            "pattern": "^[A-Za-z][A-Za-z0-9_]{0,63}$",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "database",
      +          "table"
      +        ],
      +        "type": "object"
      +      },
      +      "type": {
      +        "const": "table",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "settings"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "settings": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "channel_name": {
      +                "description": "Slack channel name, such as #alerts. Resolved to its channel ID on every save.",
      +                "type": "string"
      +              },
      +              "integration_id": {
      +                "description": "Slack integration connected to the organization, from list-integrations. list-integrations needs a user credential such as OAuth; with an API key, reuse the integration_id of an existing Slack sink or ask the user for it.",
      +                "format": "uuid",
      +                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "integration_id",
      +              "channel_name"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "additionalProperties": false,
      +            "properties": {
      +              "channel_id": {
      +                "description": "Slack channel ID, such as C0123456789. Send back the saved channel_id to keep an existing sink without a Slack lookup.",
      +                "pattern": "^[A-Z0-9]{2,64}$",
      +                "type": "string"
      +              },
      +              "integration_id": {
      +                "description": "Slack integration connected to the organization, from list-integrations. list-integrations needs a user credential such as OAuth; with an API key, reuse the integration_id of an existing Slack sink or ask the user for it.",
      +                "format": "uuid",
      +                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "integration_id",
      +              "channel_id"
      +            ],
      +            "type": "object"
      +          }
      +        ],
      +        "description": "integration_id and exactly one of channel_name or channel_id. The RawTree app must be a member of private channels."
      +      },
      +      "type": {
      +        "const": "slack",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "settings"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Addedv0.4.2

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag non-idempotent and destructive, but the description goes well beyond them: it explains that an enabled schedule starts recurring execution and sink delivery, that workflows run with organization credentials and survive revocation of the creating key, and that write capability comes from INSERT SELECT in the SQL. It also states the authorization model (admin API key bound to org and cluster, or OAuth; members read, admins write), which is behavior an agent cannot infer from the annotations.

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?

Front-loaded with purpose, defaults, and the non-idempotency warning before drifting into detail. The long trailing block enumerating returned fields is verbose, but it is the only place that information exists since there is no output schema, so it largely earns its space.

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

Completeness5/5

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

For a 7-parameter nested-object mutation with no output schema, the description covers side effects, defaults, auth prerequisites, permission boundaries, non-idempotency recovery, and the full return shape including the security-relevant note that header values and some URLs are never returned. An agent has everything needed to call this correctly and safely.

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

Parameters4/5

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

Schema coverage is 71%, so the schema already documents most parameters; the description still adds meaning by stating the concrete defaults (cron "* * * * * *" enabled, sinks=[]), the semantics of schedule=null, and the rule that each Slack sink must use a distinct integration and channel with IDs assigned by the API. Those constraints appear nowhere in the schema.

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?

Opens with a specific verb and resource: "Create a scheduled SQL workflow." That is unambiguously distinguishable from update-workflow, get-workflow, list-workflows, and delete-workflow in the sibling list, and the rest of the opening sentence scope (scheduled SQL execution) narrows it further.

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?

Gives concrete selection context: use schedule.enabled=false to create paused, schedule=null for manual-only, and reconcile an uncertain result with list-workflows before retrying. It also names list-integrations and list-slack-channels as prerequisite lookups. It never explicitly says when to choose update-workflow instead of create, which keeps it below a 5.

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