Skip to main content
Glama

CiviCRM MCP by usefulapi

Query any entity

civicrm_query
Read-only

Read records of ANY CiviCRM entity with APIv4 Entity.get: choose fields, filter, sort and page. Use civicrm_list_entities and civicrm_get_fields for the names. Field names may be joined (contact_id.display_name, email_primary.email) or ask for an option's text (status_id:label). Examples: entity Tag; entity Campaign with where [{field:'is_active',op:'=',value:true}]; entity Contribution with select ['id','total_amount'] and where [{field:'total_amount',op:'>=',value:1000}]. Read-only; credential fields and system entities (settings, payment processors, mailings, users) are refused.

Input Schema

NameRequiredDescriptionDefault
limitNoRecords per call, 1-100 (default 25).
whereNoFilters, all of which must match.
entityYesAPIv4 entity name, e.g. Campaign.
offsetNoHow many records to skip (default 0). Pass the previous reply's next_offset.
selectYesFields to return.
order_byNoSort order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnlyHint/destructiveHint annotations, it discloses a real behavioral constraint: credential fields and system entities (settings, payment processors, mailings, users) are refused. That prevents wasted calls and is not derivable from the annotations. It does not describe the response shape (no output schema) or pagination continuation beyond the word 'page'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and key constraint are front-loaded in the first sentence, and the refusal policy closes the paragraph. The three examples are dense but the second and third both demonstrate where-clause syntax, so there is slight redundancy that could be trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a generic 6-parameter query tool with no output schema, the description covers entity/field discovery, filter syntax, joins, pagination, and refusal rules. The only meaningful gap is that the shape of the returned payload and the next_offset continuation are not explained in prose.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage the baseline is 3, and the description genuinely adds meaning the regex patterns cannot: field names may be joined (`contact_id.display_name`) or request option text (`status_id:label`), plus a concrete where/select example. limit/offset/order_by semantics are left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource+mechanism: 'Read records of ANY CiviCRM entity with APIv4 Entity.get.' The 'ANY entity' framing distinguishes it from the specialized list_* siblings, which are scoped to one entity type, so an agent can immediately tell this is the generic escape hatch.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete usage context via three worked examples (Tag, Campaign with where, Contribution with select+where) and routes the agent to civicrm_list_entities and civicrm_get_fields to resolve entity/field names. It never explicitly says when to prefer a sibling like civicrm_list_contributions over this generic query, so alternatives remain implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.