Skip to main content
Glama

aggregateContacts

Analyze and aggregate contact data to generate numerical statistics and percentages. Use to answer questions like 'how many work at X?' or 'what % are Y?'. Ideal for insights on job titles, companies, and locations without revealing specific contact details.

Instructions

Get numerical statistics and counts ONLY. Returns numbers and percentages, never specific contacts. For counting questions like "how many work at Google?" or "what % are engineers?". Use search endpoint instead for any "who" questions or to get actual contact details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
company_nameNoIf the query refers to a company or acronym of companies, list company names as they would on a LinkedIn profile.
job_titleNoIf the query refers to a job title, position, or industry, list relevant job titles as they would be on a LinkedIn profile. Examples: Developer should return positions such as 'Software Engineer', 'Full Stack Developer', 'Data Scientist', etc. Banker should return positions such as 'Financial Analyst', 'Investment Banker', 'Credit Analyst', etc. Healthcare industry should return positions such as 'Registered Nurse', 'Physician', 'Medical Director', etc. Legal industry should return positions such as 'Attorney', 'Legal Counsel', 'Paralegal', etc.
locationNoIf the query refers to a location (city, state, country, region) where people are located or based, list the locations as they would appear on a LinkedIn profile. For example, if someone asks about "people in New York", return "New York City Metropolitan Area" or if they ask about "contacts in California", return "San Francisco Bay Area", "Greater Los Angeles Area", etc.
queryYesThe raw search query from the user. This field is required and should contain all the key details extracted from the user's prompt to enable effective database searching and aggregation. For example, if the user asks 'how many people work at Google', preserve both the company filter 'Google' and the fact that they want a count. If they ask 'what are the most common job titles in my network', preserve that they want job titles aggregated and ranked by frequency. The query should maintain any conditions (OR, AND) and aggregation needs to properly build the elasticsearch query.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states what the tool returns ('numbers and percentages, never specific contacts') and what it doesn't return. However, it doesn't mention potential limitations like rate limits, authentication requirements, or error conditions that would be helpful for a tool performing database aggregation operations.

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?

The description is perfectly concise and well-structured: three sentences that each earn their place. The first sentence states the core purpose, the second provides concrete examples, and the third gives explicit usage boundaries with the alternative tool. No wasted words, front-loaded with the most important information.

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 tool with no annotations and no output schema, the description does an excellent job of explaining what the tool does and when to use it. However, it doesn't describe the output format beyond 'numbers and percentages' - no mention of specific return structure, data types, or error responses. Given the complexity of aggregation operations, more output details would be helpful.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description doesn't add any additional parameter semantics beyond what's in the schema descriptions. It mentions 'query' field usage indirectly through examples but doesn't provide additional context about how parameters interact or are processed.

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's purpose: 'Get numerical statistics and counts ONLY' with specific examples like 'how many work at Google?' and 'what % are engineers?'. It explicitly distinguishes from sibling tools by contrasting with 'search endpoint' for 'who' questions or contact details, making the distinction from searchContacts and getContact very clear.

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?

The description provides explicit guidance on when to use this tool versus alternatives: 'Use search endpoint instead for any "who" questions or to get actual contact details.' It gives clear examples of appropriate use cases (counting questions, percentage queries) and explicitly names the alternative tool (search endpoint/searchContacts).

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

Related 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/clay-inc/clay-mcp'

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