scb.tables.query
Run a statistical query against an SCB table — specify dimension filters to slice data by region, age, sex, year, etc. Returns JSON-stat2 format with labeled dimensions and numeric values. Always call scb.table_metadata first to discover valid dimension codes and value codes. Example: Sweden tota...
This record as markdown: /tools/io-github-whiteknightonhorse-apibase/scb.tables.query.md
What scb.tables.query does on Apibase
AI agents invoke scb.tables.query to trigger actions in Apibase. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | array | Yes | Array of dimension filters. Each filter selects which values to include for one dimension. Example: [{code:'Region',selection:{filter:'vs:RegionRiket99',values: |
table_path | string | Yes | Full path to the leaf table to query — same as scb.table_metadata table_path. Example: 'BE/BE0101/BE0101A/BefolkningNy'. |
Parameters from the server's own tool schema.
Why scb.tables.query is rated High
Executes queries against external SCB statistical database with dimension filters.
From the tool's definition Run a statistical query against an SCB table
Risk signalsAccepts freeform code/query input (query[].code)
Attacks that exploit this kind of access
The rule that runs scb.tables.query safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Apibase, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For scb.tables.query, this is the rule to start with:
scb.tables.query stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Apibase, apply this rule, and every scb.tables.query call is checked against it from then on.
Questions about scb.tables.query
Run a statistical query against an SCB table — specify dimension filters to slice data by region, age, sex, year, etc. Returns JSON-stat2 format with labeled dimensions and numeric values. Always call scb.table_metadata first to discover valid dimension codes and value codes. Example: Sweden total population (Region='00', filter='vs:RegionRiket99'), latest year (Tid filter='top' values=['1']). It is categorised as a Execute tool in the Apibase MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
scb.tables.query accepts 2 parameters: query, table_path. Required: query, table_path. The full parameter table on this page comes from the server's own tool schema.
Register the Apibase MCP server in PolicyLayer and add a rule for scb.tables.query: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Apibase. Nothing to install.
scb.tables.query is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the scb.tables.query rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for scb.tables.query. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
scb.tables.query is provided by the Apibase MCP server (apibase-mcp-client). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Apibase, and thousands of servers like it.
Across the catalogue