# get_metric

Отримати реальну цифру з бази даних та повернути юзеру в чат. metric_type: count (кількість записів), sum (сума числового поля), average (середнє), new_today (нові записи сьогодні), updated_today (оновлені сьогодні), growth (порівняння поточного і попереднього period, потребує date_field і compare_period). entity_id може бути ID форми або ID звіту (з фільтром).

Agent View of the PolicyLayer registry record for `get_metric`. HTML page: https://policylayer.com/tools/com-quintadb-mcp/get-metric

## Facts

- Tool: `get_metric`
- Server: QuintaDB (`https://quintadb.com/mcp`) — https://policylayer.com/tools/com-quintadb-mcp.md
- Homepage: https://github.com/https://quintadb.com/mcp
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server auth posture: open
- Server rate-limited: no
- Parameters: 6 (3 required)
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `app_id` | string | yes | Project ID (from list_projects) |
| `entity_id` | string | yes | ID форми або ID звіту (report) — якщо звіт, метрика рахується тільки по відфільтрованих записах |
| `date_field` | string | no | Назва або ID поля дати (обов'язково для growth). Можна передати 'created_at' або 'updated_at' для системних полів. |
| `metric_type` | string | yes | count \| sum \| average \| new_today \| updated_today \| growth |
| `value_field` | string | no | Назва або ID числового поля (обов'язково для sum і average) |
| `compare_period` | string | no | Для 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.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_metric",
    "arguments": {
      "app_id": "<app_id>",
      "entity_id": "<entity_id>",
      "metric_type": "<metric_type>"
    }
  }
}
```

## 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 own 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."

## Use case

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.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches QuintaDB:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "get_metric": {}
  }
}
```

## Other tools on QuintaDB (115)

- `delete_few_records` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-few-records.md
- `delete_field` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-field.md
- `delete_form` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-form.md
- `delete_portal_group` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-portal-group.md
- `delete_portal_menu_item` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-portal-menu-item.md
- `delete_portal_user` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-portal-user.md
- `delete_project` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-project.md
- `delete_record` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-record.md
- `delete_records_by_filter` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-records-by-filter.md
- `delete_reminder` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-reminder.md
- `delete_saved_view` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-saved-view.md
- `delete_schedule` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-schedule.md
- `delete_team_group` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-team-group.md
- `delete_template` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-template.md
- `delete_webhook` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/delete-webhook.md
- `remove_user_from_portal_group` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/remove-user-from-portal-group.md
- `remove_user_from_team_group` — Destructive — https://policylayer.com/tools/com-quintadb-mcp/remove-user-from-team-group.md
- `run_action` — Execute — https://policylayer.com/tools/com-quintadb-mcp/run-action.md
- `check_ai_site_status` — Read — https://policylayer.com/tools/com-quintadb-mcp/check-ai-site-status.md
- `describe_project` — Read — https://policylayer.com/tools/com-quintadb-mcp/describe-project.md
- `export_records` — Read — https://policylayer.com/tools/com-quintadb-mcp/export-records.md
- `fetch_url` — Read — https://policylayer.com/tools/com-quintadb-mcp/fetch-url.md
- `get_column_total` — Read — https://policylayer.com/tools/com-quintadb-mcp/get-column-total.md
- `get_field_types` — Read — https://policylayer.com/tools/com-quintadb-mcp/get-field-types.md
- `get_form_fields` — Read — https://policylayer.com/tools/com-quintadb-mcp/get-form-fields.md
- `get_form_settings` — Read — https://policylayer.com/tools/com-quintadb-mcp/get-form-settings.md
- `get_portal_page` — Read — https://policylayer.com/tools/com-quintadb-mcp/get-portal-page.md
- `get_project` — Read — https://policylayer.com/tools/com-quintadb-mcp/get-project.md
- `get_quickstart_guide` — Read — https://policylayer.com/tools/com-quintadb-mcp/get-quickstart-guide.md
- `get_record` — Read — https://policylayer.com/tools/com-quintadb-mcp/get-record.md
- …and 85 more: https://policylayer.com/tools/com-quintadb-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=com-quintadb-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/com-quintadb-mcp
