# openehr_query_adhoc

A execute tool on the openEHR MCP Server MCP server.

Agent View of the PolicyLayer registry record for `openehr_query_adhoc`. HTML page: https://policylayer.com/tools/deak-ai-openehr-mcp-server/openehr-query-adhoc

## Facts

- Tool: `openehr_query_adhoc`
- Server: openEHR MCP Server (`deak-ai/openehr-mcp-server`) — https://policylayer.com/tools/deak-ai-openehr-mcp-server.md
- Homepage: https://github.com/deak-ai/openehr-mcp-server
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

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

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

## Why openehr_query_adhoc is rated High

Ad-hoc query execution typically allows arbitrary query strings to be submitted at runtime. In the context of this openEHR server, this maps to AQL (Archetype Query Language) execution, which can read or potentially modify data depending on query content. Since the description is empty, confidence is reduced, but 'adhoc' queries are canonically Execute-category — running arbitrary code/queries against a system.

From the tool's own definition: "Tool name 'openehr_query_adhoc' — 'adhoc' strongly implies execution of arbitrary/user-supplied AQL queries against the openEHR server; server description mentions 'executing AQL queries'"

## Use case

AI agents invoke openehr_query_adhoc to trigger actions in openEHR MCP Server. 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.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches openEHR MCP Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "openehr_query_adhoc": {
      "limits": [
        {
          "counter": "openehr_query_adhoc_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on openEHR MCP Server (12)

- `openehr_composition_delete` — Destructive — https://policylayer.com/tools/deak-ai-openehr-mcp-server/openehr-composition-delete.md
- `openehr_composition_get` — Read — https://policylayer.com/tools/deak-ai-openehr-mcp-server/openehr-composition-get.md
- `openehr_compositions_list` — Read — https://policylayer.com/tools/deak-ai-openehr-mcp-server/openehr-compositions-list.md
- `openehr_ehr_get` — Read — https://policylayer.com/tools/deak-ai-openehr-mcp-server/openehr-ehr-get.md
- `openehr_ehr_get_by_subject` — Read — https://policylayer.com/tools/deak-ai-openehr-mcp-server/openehr-ehr-get-by-subject.md
- `openehr_ehr_list` — Read — https://policylayer.com/tools/deak-ai-openehr-mcp-server/openehr-ehr-list.md
- `openehr_template_example_composition` — Read — https://policylayer.com/tools/deak-ai-openehr-mcp-server/openehr-template-example-composition.md
- `openehr_template_get` — Read — https://policylayer.com/tools/deak-ai-openehr-mcp-server/openehr-template-get.md
- `openehr_template_list` — Read — https://policylayer.com/tools/deak-ai-openehr-mcp-server/openehr-template-list.md
- `openehr_composition_create` — Write — https://policylayer.com/tools/deak-ai-openehr-mcp-server/openehr-composition-create.md
- `openehr_composition_update` — Write — https://policylayer.com/tools/deak-ai-openehr-mcp-server/openehr-composition-update.md
- `openehr_ehr_create` — Write — https://policylayer.com/tools/deak-ai-openehr-mcp-server/openehr-ehr-create.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=deak-ai-openehr-mcp-server · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/deak-ai-openehr-mcp-server
