Skip to content

read_table_data

MCP tools › Databases

Read one page of a table like the table data editor: optional where and order_by clause bodies (refused when they contain ; or a comment), page (0-based, 500 rows). Without order_by the table's key orders the rows, so pages are stable. Returns columns, rows, total_rows, page, pages and the SQL that ran. Needs read-schema and read-data.

Its results carry text from database: the client is told to treat that as data, never as instructions.

Capabilitydatabase.read_table_data
AreaDatabases
Accessreads only
Reachesdatabase, network
Rightsssh, database-permission, trusted-project
Dry runnone

Arguments

ArgumentTypeDescription
connectionrequiredstringConnection name from list_connections.
tablerequiredstringTable or view of the connection's current schema.
wherestringBody of the WHERE clause, e.g. qty > 5.
order_bystringBody of the ORDER BY clause, e.g. name desc (default: the table's key).
pageinteger0-based page of 500 rows (default 0).minimum 0

Call it from a shell

ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.

Terminal window
ferris-idea call ~/my-project read_table_data '{"connection":"<string>","table":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"connection",
"table"
],
"properties": {
"connection": {
"description": "Connection name from `list_connections`.",
"type": "string"
},
"table": {
"description": "Table or view of the connection's current schema.",
"type": "string"
},
"where": {
"description": "Body of the WHERE clause, e.g. `qty > 5`.",
"type": [
"string",
"null"
]
},
"order_by": {
"description": "Body of the ORDER BY clause, e.g. `name desc` (default: the table's key).",
"type": [
"string",
"null"
]
},
"page": {
"description": "0-based page of 500 rows (default 0).",
"type": [
"integer",
"null"
],
"minimum": 0
}
}
}