---
title: "Query app data records for one entity with optional exact-match filters"
method: POST
path: "/api/mcp/tools/query_entity"
tags: ["tools"]
---

# Query app data records for one entity with optional exact-match filters

`POST /api/mcp/tools/query_entity`

## Request

- Base URL: `https://finestructure.ai`
- URL: `https://finestructure.ai/api/mcp/tools/query_entity`
- Auth: HTTP bearer

Query app data records for one entity with optional exact-match filters.

## Request body

- object
  - `app_id` string, required: The app ID
  - `entity` string, required: Entity name, for example Patient
  - `filters` object: Exact-match field filters
  - `sort` string: Sort field, prefix with - for descending
  - `limit` integer: Max records to return
  - `offset` integer: Pagination offset

## Response `200`

Tool executed successfully

- ToolResult
  - `ok` boolean, required
  - `tool` string, required
  - `result` object, required

## Other responses

- `400`: Invalid arguments for this tool
- `401`: Missing or invalid bearer token
- `402`: Not enough credits on the account
- `403`: Token scope does not permit this tool
- `404`: Unknown tool name
- `429`: Rate limit exceeded, retry after the indicated delay
- `500`: Internal error while executing the tool

---

[API](https://skmtc.dev/finestructure/apis/fine-structure-api.md) · [All operations](https://skmtc.dev/finestructure/apis/fine-structure-api/llms.txt) · [OpenAPI document](https://skmtc.dev/finestructure/apis/fine-structure-api/revisions/02c50ed5fd70?raw)
