Skip to main content
Glama
alludium

Affinity MCP Server

by alludium

Search Companies

affinity_search_companies
Read-onlyIdempotent

Search companies by name or domain with partial matching. Find specific organizations or list all using pagination.

Instructions

Search for companies (organizations) in Affinity by name or domain.

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

Use this tool to:

  • Find a company by its domain (e.g., "acme.com")

  • Search for companies by name

  • List all companies (omit term parameter)

Search Behavior:

  • Domain search: Exact and partial matching (e.g., "acme" matches "acme.com")

  • Name search: Partial matching on organization name

  • Empty term: Returns all organizations (paginated)

Global vs Custom Organizations:

  • global=true: Shared record from Affinity's database (cannot modify/delete)

  • global=false: Custom organization you created (can modify/delete)

Parameters:

  • term: Company name or domain to search

  • withInteractionDates: Include first/last email and event timestamps

  • pageSize: Results per page (max 500)

  • pageToken: Pagination token for next page

Returns (JSON): { "organizations": [ { "id": number, // Use with V2 affinity_get_company "name": string, "domain": string | null, "domains": string[], "global": boolean, // true=shared, false=custom "interaction_dates": {} // if requested } ], "next_page_token": string | null, "count": number, "hasMore": boolean }

Example use cases:

  • Look up company by domain: term="acme.com"

  • Search by name: term="Acme Corporation"

  • Find companies at a TLD: term=".io"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termNoSearch term: company name or domain. Omit to list all companies.
withInteractionDatesNoInclude first/last email and event timestamps
withInteractionPersonsNoInclude person IDs from interactions
withOpportunitiesNoInclude opportunity 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?

Annotations already declare readOnlyHint=true, destructiveHint=false. Description adds valuable context: V1 endpoint, exact/partial matching, empty term behavior, global vs custom organization semantics. No contradiction. Add more about authorization or rate limits? Not needed given annotations.

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?

Well-structured: purpose, V1 note, use cases, behavior, parameter list, return JSON, examples. Every section adds value, front-loaded with purpose. No fluff. Ideal length for a search tool.

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?

No output schema, but description provides full return JSON. Explains pagination, global flag semantics. Missing explanation of withInteractionPersons/withOpportunities in description text, but schema covers them. Nearly complete given complexity.

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 coverage is 100% with descriptions. Description adds context for key parameters (term matching, pageSize max, pageToken usage) and shows return structure. Two parameters (withInteractionPersons, withOpportunities) are only in schema, but that's acceptable; description complements well.

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 the tool searches for companies by name or domain, with specific verb 'search' and resource 'companies'. It differentiates from siblings like affinity_list_companies (list all) and affinity_get_company (by ID) by noting this is the search endpoint and mentioning V1 vs V2.

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?

Explicitly lists three use cases: find by domain, search by name, list all. Provides example uses. Does not explicitly say when not to use, but sibling tools for creating/modifying imply this is read-only. Could be improved with direct exclusions.

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