Skip to main content
Glama

pylon_update_tag

Modify existing tags in the Pylon customer support platform by updating their names and colors to organize and categorize support data effectively.

Instructions

Update an existing tag

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe tag ID
valueNoUpdated tag name
hex_colorNoUpdated hex color

Implementation Reference

  • src/index.ts:551-565 (registration)
    Registers the MCP tool 'pylon_update_tag' with input schema (id required, value/hex_color optional) and a handler that delegates to PylonClient.updateTag and returns JSON response.
    server.tool( 'pylon_update_tag', 'Update an existing tag', { id: z.string().describe('The tag ID'), value: z.string().optional().describe('Updated tag name'), hex_color: z.string().optional().describe('Updated hex color'), }, async ({ id, ...data }) => { const result = await client.updateTag(id, data); return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }], }; }, );
  • Zod input schema for the tool parameters.
    { id: z.string().describe('The tag ID'), value: z.string().optional().describe('Updated tag name'), hex_color: z.string().optional().describe('Updated hex color'), },
  • Thin MCP tool handler that invokes PylonClient.updateTag.
    async ({ id, ...data }) => { const result = await client.updateTag(id, data); return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }], }; },
  • Core handler implementing the tag update by making a PATCH request to the Pylon API /tags/{id} endpoint.
    async updateTag( id: string, data: { value?: string; hex_color?: string }, ): Promise<SingleResponse<Tag>> { return this.request<SingleResponse<Tag>>('PATCH', `/tags/${id}`, data); }
  • Shared HTTP request helper method used by updateTag to perform the API call.
    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>; }

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