Skip to main content
Glama
alludium

Affinity MCP Server

by alludium

Search Persons

affinity_search_persons
Read-onlyIdempotent

Find persons in Affinity CRM by email, first name, or last name. Supports partial domain matching and listing all contacts.

Instructions

Search for persons (contacts) in Affinity by email, first name, or last name.

This is a V1 API endpoint - search is NOT available in V2.

Use this tool to:

  • Find a person by their email address

  • Search for persons by first or last name

  • List all persons (omit term parameter)

Search Behavior:

  • Email search: Partial domain matching works (e.g., "@company.com" finds all at that domain)

  • Name search: Partial matching on first_name or last_name

  • Empty term: Returns all persons (paginated)

Parameters:

  • term: Email, first name, or last name to search

  • withInteractionDates: Include first/last email and event timestamps

  • withCurrentOrganizations: Include organization IDs the person belongs to

  • pageSize: Results per page (max 500)

  • pageToken: Pagination token for next page

Returns (JSON): { "persons": [ { "id": number, "first_name": string, "last_name": string, "primary_email": string | null, "emails": string[], "type": number, // 0=external, 1=internal "interaction_dates": {}, // if requested "current_organization_ids": [] // if requested } ], "next_page_token": string | null, "count": number, "hasMore": boolean }

Example use cases:

  • Look up person by email before creating: term="john@example.com"

  • Find all persons at a company: term="@acme.com"

  • Search by name: term="John"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termNoSearch term: email address, first name, or last name. Omit to list all persons.
withInteractionDatesNoInclude first/last email and event timestamps
withInteractionPersonsNoInclude persons involved in interactions
withOpportunitiesNoInclude opportunity IDs associated with person
withCurrentOrganizationsNoInclude current organization IDs
pageSizeNoItems per page (default 100, max 500)
pageTokenNoPagination token from previous response (next_page_token)
responseFormatNoOutput format: "json" or "markdown". Default: "json"
Behavior4/5

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

The description adds significant behavioral context beyond the annotations (readOnlyHint, idempotentHint, etc.), including partial domain matching for emails, partial name matching, empty term behavior, pagination details, and the meaning of the 'type' field (0=external, 1=internal). It does not repeat or contradict annotations.

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 description is well-structured with clear sections (Search Behavior, Parameters, Returns) and front-loads the core purpose. It includes a full JSON example that is helpful given the lack of an output schema. Every sentence adds value, but it is slightly verbose with the example and parameter list.

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?

Given the complexity (8 parameters, no output schema, many sibling tools), the description covers essential aspects: search behavior, parameter details, pagination, return format with example, and use cases. It explains the type field and interaction dates. However, it does not elaborate on withInteractionPersons or withOpportunities beyond the schema, nor does it mention the openWorldHint implications.

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?

While the input schema has 100% description coverage, the description enriches parameter semantics by explaining behavioral details (e.g., 'Partial domain matching works' for term, 'Omit to list all persons'). It also maps parameters to use cases in the examples, adding value beyond the schema alone.

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?

The description clearly states 'Search for persons (contacts) in Affinity by email, first name, or last name.' It specifies the verb (Search), resource (persons/contacts), and how it differs from related tools like affinity_get_person by supporting partial matching and listing all persons when no term is provided.

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?

The description provides explicit use cases: find by email, search by name, list all persons. It gives example scenarios like 'Look up person by email before creating' and 'Find all persons at a company.' However, it does not explicitly state when not to use it or compare it directly with sibling tools like affinity_get_person or affinity_list_persons.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alludium/affinity-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server