Refresh the datasource schema
refresh_schemaRefresh schema from datasource and auto-select new tables/columns. Use after execute() to make new tables visible to other tools. The refresh runs in the background, so this is a two-step tool: call it ONCE with no poll argument to start the import, then call it with poll: true until state is "complete" or "failed". poll: true only reads the run — it never starts one — and reports state, stage and tables_completed of tables_total, plus the result summary (tables added/removed, columns added, relationships, and any PII fields held_back for human review) once the state is "complete". A poll on a datasource with no import on record answers state "no_run". WITHOUT poll the call is a request, not a read: it reports a refresh that is still running, but on a run that has finished it starts a new full import of the datasource. Never loop on that form.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "refresh_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| poll | No | Read the current import's state without starting anything (default: false). This is how you follow a refresh to completion: poll: true never begins an import, so it is safe to call in a loop and safe to retry. | |
| datasource | No | Optional datasource ID to target. Omit to use the project's configured default; required when the project has multiple datasources and no default is configured. Each datasource has its own SQL dialect: get_schema lists every datasource with its type, dialect and identifier quote, and every result carries datasource_type and dialect. A datasource that has not finished setup is refused with datasource_not_ready. | |
| auto_select | No | Automatically select all new tables/columns (default: true) |