Skip to main content
Glama

pylon_search_accounts

Search customer accounts in Pylon using filters for domains, tags, names, or external IDs to find specific records and manage support data.

Instructions

Search accounts with filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterYesFilter object with fields like domains, tags, name. Supports operators: equals, contains, in, not_in, is_set, is_unset
limitNoResults limit
cursorNoPagination cursor

Implementation Reference

  • src/index.ts:135-159 (registration)
    Registration of the 'pylon_search_accounts' MCP tool, including input schema (Zod object for filter with domains/tags/name/external_ids passthrough, optional limit 1-1000, cursor) and handler function that invokes PylonClient.searchAccounts and returns formatted JSON response.
    server.tool(
    	'pylon_search_accounts',
    	'Search accounts with filters',
    	{
    		filter: z
    			.object({
    				domains: z.object({}).optional(),
    				tags: z.object({}).optional(),
    				name: z.object({}).optional(),
    				external_ids: z.object({}).optional(),
    			})
    			.passthrough()
    			.describe(
    				'Filter object with fields like domains, tags, name. Supports operators: equals, contains, in, not_in, is_set, is_unset',
    			),
    		limit: z.number().min(1).max(1000).optional().describe('Results limit'),
    		cursor: z.string().optional().describe('Pagination cursor'),
    	},
    	async ({ filter, limit, cursor }) => {
    		const result = await client.searchAccounts(filter, { limit, cursor });
    		return {
    			content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
    		};
    	},
    );
  • Implementation of searchAccounts method in PylonClient class, which sends a POST request to the Pylon API /accounts/search endpoint with the filter and pagination parameters, returning a paginated list of accounts.
    async searchAccounts(
    	filter: object,
    	params?: PaginationParams,
    ): Promise<PaginatedResponse<Account>> {
    	return this.request<PaginatedResponse<Account>>(
    		'POST',
    		'/accounts/search',
    		{
    			filter,
    			limit: params?.limit,
    			cursor: params?.cursor,
    		},
    	);
    }
  • Private request method in PylonClient used by searchAccounts to perform authenticated HTTP requests to the Pylon API.
    private async request<T>(
    	method: string,
    	path: string,
    	body?: object,
    ): Promise<T> {
    	const url = `${PYLON_API_BASE}${path}`;
    	const headers: Record<string, string> = {
    		Authorization: `Bearer ${this.apiToken}`,
    		'Content-Type': 'application/json',
    		Accept: 'application/json',
    	};
    
    	const response = await fetch(url, {
    		method,
    		headers,
    		body: body ? JSON.stringify(body) : undefined,
    	});
    
    	if (!response.ok) {
    		const errorText = await response.text();
    		throw new Error(
    			`Pylon API error: ${response.status} ${response.statusText} - ${errorText}`,
    		);
    	}
    
    	return response.json() as Promise<T>;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Search accounts with filters' implies a read-only operation but doesn't specify pagination behavior (though cursor parameter hints at it), rate limits, authentication requirements, or what happens with empty results. The description adds minimal context beyond the basic operation.

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 extremely concise at just 4 words with zero wasted language. It's front-loaded with the core functionality and appropriately sized for what it communicates, though it could benefit from more completeness.

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

Completeness2/5

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

For a search tool with 3 parameters (including a complex nested filter object), no annotations, and no output schema, the description is inadequate. It doesn't explain what 'accounts' represent in this system, what fields can be searched, how results are structured, or any behavioral constraints. The agent lacks sufficient context to use this tool effectively.

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 mentions 'filters' which aligns with the filter parameter but adds no additional meaning about parameter usage, relationships, or semantics beyond what's in the schema descriptions.

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

Purpose3/5

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

The description 'Search accounts with filters' clearly states the verb (search) and resource (accounts), but it's vague about scope and doesn't differentiate from sibling tools like pylon_list_accounts or pylon_search_contacts. It lacks specificity about what kind of search this performs compared to alternatives.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool versus alternatives like pylon_list_accounts or pylon_get_account. The description doesn't mention any context, prerequisites, or exclusions for usage, leaving the agent with no decision-making framework.

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/JustinBeckwith/pylon-mcp'

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