Skip to Content
dropshelf
MCPToolsConnectors

run_query

Try a query before putting it in a drop's _dropshelf/queries.yaml.

On a database: one SELECT, checked as a deploy checks a drop's queries (your scope, a view's tables only through the view, read only, no denied functions), never cached, at most 100 rows; viewer parameters (:viewer_email and the like) are your own. On an MCP server: one tool the source allows, with its args, called once with your own connection; the answer's result is what the tool returned.

Read-only

Needs connectors.enabled on the instance.

Input

NameTypeRequiredDescription
argsobjectnothe tool's arguments, as its input schema in describe_source names them
paramsobjectnovalues for the :name placeholders, as strings
sourcestringyesthe source's name, as list_sources gives it
sqlstringnofor a database: one SELECT in the source's dialect; :name placeholders take values from params
toolstringnofor an MCP server: one of the tools the source allows, as describe_source lists them

Output

FieldTypeAlways presentDescription
columnsarray of objectno
columns[].namestringyes
columns[].typestringyes
fetchedAtstringyesWhen it was read.
resultstring or number or boolean or object or array of any, nullablenofor a tool call on an MCP server: what the tool returned
rowsarray of array of string or number or boolean or object or array of any, nullableno
The output as JSON Schema
{
  "properties": {
    "columns": {
      "items": {
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "type"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "fetchedAt": {
      "description": "When it was read.",
      "format": "date-time",
      "type": "string"
    },
    "result": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "object"
        },
        {
          "type": "array"
        }
      ],
      "description": "for a tool call on an MCP server: what the tool returned"
    },
    "rows": {
      "items": {
        "items": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "null"
            },
            {
              "type": "object"
            },
            {
              "type": "array"
            }
          ],
          "description": "a cell: text, a number, true or false, null, or a json column's value"
        },
        "type": "array"
      },
      "type": "array"
    }
  },
  "required": [
    "fetchedAt"
  ],
  "type": "object"
}

Generated from dropshelf core at 6a548b2, 26 Nov 2026.

On this page