Skip to main content
Glama

CiviCRM MCP by usefulapi

Create membership

civicrm_create_membership

WRITE: gives ONE contact a membership of a type. CiviCRM works out the dates and status from the type unless you give dates. It does NOT record a payment (use civicrm_record_contribution for that) and sends nothing. APIv4 Membership.create.

Input Schema

NameRequiredDescriptionDefault
sourceNoWhere it came from (free text).
end_dateNoEnd date (default: calculated by the type).
join_dateNoJoin date (default today).
contact_idYesCiviCRM contact id.
start_dateNoStart date (default: calculated by the type).
membership_typeYesMembership type by name, e.g. General (see civicrm_get_fields Membership, field membership_type_id).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=false; the description goes beyond them by disclosing two non-obvious side effects: dates/status are derived from the membership type unless supplied, and neither a payment nor any message is produced. It does not address permissions or what happens on duplicate memberships, which keeps it short of a 5.

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

Conciseness5/5

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

Three short sentences, front-loaded with the 'WRITE:' marker so the mutation class is visible immediately. Every clause carries distinct information: scope, derivation behavior, excluded side effects, and backend API.

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 6-parameter mutation with full schema coverage and no output schema, the definition covers the important gaps. The only omission is what is returned (e.g. the new membership id), which matters slightly since there is no output schema to fall back on.

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?

Schema description coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema does not: start/end dates are optional because the membership type calculates them. That is the key semantic decision an agent must make, and it is stated directly.

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 and resource ('gives ONE contact a membership of a type') plus the underlying API call (Membership.create). The 'ONE contact' qualifier distinguishes it from any bulk/multi-contact path, and the explicit mention of civicrm_record_contribution separates it from the contribution sibling.

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

Usage Guidelines5/5

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

Names a concrete alternative and the condition that selects it: no payment is recorded, so use civicrm_record_contribution for that. It also sets expectations about notifications ('sends nothing'). The when-not guidance is explicit rather than inferred.

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.