Skip to main content
Glama

pylon_update_contact

Modify contact details in the Pylon customer support platform, including name, email, account association, avatar, and portal role.

Instructions

Update an existing contact

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe contact ID
nameNoUpdated name
emailNoUpdated email
account_idNoUpdated account association
avatar_urlNoUpdated avatar URL
portal_roleNoUpdated portal role

Implementation Reference

  • Core handler logic for updating a contact via PATCH API request to `/contacts/${id}` using the shared request method.
    async updateContact(
    	id: string,
    	data: Partial<Contact>,
    ): Promise<SingleResponse<Contact>> {
    	return this.request<SingleResponse<Contact>>(
    		'PATCH',
    		`/contacts/${id}`,
    		data,
    	);
    }
  • Zod schema defining the input parameters for the pylon_update_contact tool.
    	id: z.string().describe('The contact ID'),
    	name: z.string().optional().describe('Updated name'),
    	email: z.string().optional().describe('Updated email'),
    	account_id: z.string().optional().describe('Updated account association'),
    	avatar_url: z.string().optional().describe('Updated avatar URL'),
    	portal_role: z
    		.enum(['no_access', 'member', 'admin'])
    		.optional()
    		.describe('Updated portal role'),
    },
  • src/index.ts:223-243 (registration)
    MCP server tool registration for 'pylon_update_contact', including input schema and thin wrapper handler that delegates to PylonClient.updateContact and formats the response as text.
    server.tool(
    	'pylon_update_contact',
    	'Update an existing contact',
    	{
    		id: z.string().describe('The contact ID'),
    		name: z.string().optional().describe('Updated name'),
    		email: z.string().optional().describe('Updated email'),
    		account_id: z.string().optional().describe('Updated account association'),
    		avatar_url: z.string().optional().describe('Updated avatar URL'),
    		portal_role: z
    			.enum(['no_access', 'member', 'admin'])
    			.optional()
    			.describe('Updated portal role'),
    	},
    	async ({ id, ...data }) => {
    		const result = await client.updateContact(id, data);
    		return {
    			content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }],
    		};
    	},
    );
  • TypeScript interface defining the Contact object structure used in updateContact.
    export interface Contact {
    	id: string;
    	name: string;
    	email?: string;
    	emails?: string[];
    	avatar_url?: string;
    	account?: { id: string; name: string };
    	custom_fields?: object;
    	portal_role?: string;
    }
  • Shared HTTP request method used by updateContact to perform authenticated API calls.
    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 but only states the basic action ('Update'). It lacks critical behavioral details such as required permissions, whether changes are reversible, error handling, or rate limits. This is inadequate for a mutation tool with zero annotation coverage.

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 a single, efficient sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly.

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 mutation tool with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like permissions, side effects, or response format, leaving significant gaps in understanding how to use the 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 fully documents all 6 parameters. The description adds no additional meaning beyond implying that parameters update fields, which is already clear from the schema. This meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('Update') and resource ('an existing contact'), which is specific and unambiguous. However, it doesn't differentiate from sibling tools like 'pylon_update_account' or 'pylon_update_issue' beyond the resource name, missing explicit sibling distinction.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing contact ID), exclusions, or comparisons to siblings like 'pylon_create_contact' or 'pylon_get_contact', leaving usage context implied at best.

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