# query_database

Query a Notion database

Agent View of the PolicyLayer registry record for `query_database`. HTML page: https://policylayer.com/tools/io-github-portel-dev-ncp/query-database

## Facts

- Tool: `query_database`
- Server: Ncp (`@portel/ncp`) — https://policylayer.com/tools/io-github-portel-dev-ncp.md
- Install: `npx -y @portel/ncp`
- Homepage: https://github.com/portel-dev/ncp
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Allowed

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

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "query_database",
    "arguments": {}
  }
}
```

## Why query_database is rated Low

This tool retrieves or queries data from a Notion database without any side effects such as creation, modification, or deletion. It falls clearly into the Read category. The severity is low because querying data has minimal blast radius—the worst outcome is information disclosure, not data loss or financial impact.

From the tool's own definition: "Tool name 'query_database' combined with description 'Query a Notion database' indicates data retrieval without modification. The verb 'query' is explicitly associated with read-only operations."

## Use case

AI agents call query_database to retrieve information from Ncp 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 Ncp:

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

## Other tools on Ncp (274)

- `backup` — Destructive — https://policylayer.com/tools/io-github-portel-dev-ncp/backup.md
- `bulk_delete` — Destructive — https://policylayer.com/tools/io-github-portel-dev-ncp/bulk-delete.md
- `delete` — Destructive — https://policylayer.com/tools/io-github-portel-dev-ncp/delete.md
- `delete_event` — Destructive — https://policylayer.com/tools/io-github-portel-dev-ncp/delete-event.md
- `delete_key` — Destructive — https://policylayer.com/tools/io-github-portel-dev-ncp/delete-key.md
- `delete_memory` — Destructive — https://policylayer.com/tools/io-github-portel-dev-ncp/delete-memory.md
- `purge_cache` — Destructive — https://policylayer.com/tools/io-github-portel-dev-ncp/purge-cache.md
- `remove` — Destructive — https://policylayer.com/tools/io-github-portel-dev-ncp/remove.md
- `remove_container` — Destructive — https://policylayer.com/tools/io-github-portel-dev-ncp/remove-container.md
- `write_query` — Destructive — https://policylayer.com/tools/io-github-portel-dev-ncp/write-query.md
- `apply` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/apply.md
- `apply_manifest` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/apply-manifest.md
- `build_image` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/build-image.md
- `build_job` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/build-job.md
- `bulk_operations` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/bulk-operations.md
- `click_element` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/click-element.md
- `clone` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/clone.md
- `connect` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/connect.md
- `consume` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/consume.md
- `create_completion` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/create-completion.md
- `create_context` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/create-context.md
- `create_image` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/create-image.md
- `create_prediction` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/create-prediction.md
- `create_video` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/create-video.md
- `deploy` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/deploy.md
- `deploy_project` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/deploy-project.md
- `deploy_server` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/deploy-server.md
- `deploy_site` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/deploy-site.md
- `exec` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/exec.md
- `exec_async` — Execute — https://policylayer.com/tools/io-github-portel-dev-ncp/exec-async.md
- …and 244 more: https://policylayer.com/tools/io-github-portel-dev-ncp.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=io-github-portel-dev-ncp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-github-portel-dev-ncp
