get_metric
Отримати реальну цифру з бази даних та повернути юзеру в чат. metric_type: count (кількість записів), sum (сума числового поля), average (середнє), new_today (нові записи сьогодні), updated_today (оновлені сьогодні), growth (порівняння поточного і попереднього period, потребує date_field і compar...
This record as markdown: /tools/com-quintadb-mcp/get-metric.md
What get_metric does on QuintaDB
AI agents call get_metric to retrieve information from QuintaDB without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
app_id | string | Yes | Project ID (from list_projects) |
entity_id | string | Yes | ID форми або ID звіту (report) — якщо звіт, метрика рахується тільки по відфільтрованих записах |
date_field | string | — | Назва або ID поля дати (обов'язково для growth). Можна передати 'created_at' або 'updated_at' для системних полів. |
metric_type | string | Yes | count | sum | average | new_today | updated_today | growth |
value_field | string | — | Назва або ID числового поля (обов'язково для sum і average) |
compare_period | string | — | Для metric_type=growth: today_vs_yesterday | this_week_vs_last | this_month_vs_last | this_quarter_vs_last | this_year_vs_last |
Parameters from the server's own tool schema.
Why get_metric is rated Low
The tool only performs data retrieval and aggregation operations. It queries counts, sums, averages, and comparative metrics from records or reports, with no capability to create, modify, or delete data. This is a classic Read operation with minimal blast radius if misused—an agent could only extract or expose existing data.
From the tool's definition Tool description states it retrieves metrics from the database: 'Отримати реальну цифру з бази даних' (get a real number from the database) and returns it to the user in chat.
Attacks that exploit this kind of access
The rule that runs get_metric safely
PolicyLayer is an MCP gateway: it sits between your AI agents and QuintaDB, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For get_metric, this is the rule to start with:
get_metric is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect QuintaDB, apply this rule, and every get_metric call is checked against it from then on.
Questions about get_metric
Отримати реальну цифру з бази даних та повернути юзеру в чат. metric_type: count (кількість записів), sum (сума числового поля), average (середнє), new_today (нові записи сьогодні), updated_today (оновлені сьогодні), growth (порівняння поточного і попереднього period, потребує date_field і compare_period). entity_id може бути ID форми або ID звіту (з фільтром). It is categorised as a Read tool in the QuintaDB MCP Server, which means it retrieves data without modifying state.
get_metric accepts 6 parameters: app_id, entity_id, date_field, metric_type, value_field, compare_period. Required: app_id, entity_id, metric_type. The full parameter table on this page comes from the server's own tool schema.
Register the QuintaDB MCP server in PolicyLayer and add a rule for get_metric: 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 QuintaDB. Nothing to install.
get_metric is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the get_metric 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 get_metric. 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.
get_metric is provided by the QuintaDB MCP server (https://quintadb.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on QuintaDB, and thousands of servers like it.
This server
Across the catalogue