Skip to main content
Glama

pylon_get_team

Retrieve team details by ID from the Pylon customer support platform to manage team information and access specific data.

Instructions

Get a specific team by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe team ID

Implementation Reference

  • src/index.ts:600-612 (registration)
    Registration of the 'pylon_get_team' MCP tool. Includes input schema (id: z.string()), description, and inline handler function that calls PylonClient.getTeam(id) and returns the result as formatted JSON text content.
    server.tool( 'pylon_get_team', 'Get a specific team by ID', { id: z.string().describe('The team ID'), }, async ({ id }) => { const result = await client.getTeam(id); return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }], }; }, );
  • Core handler logic in PylonClient: performs HTTP GET request to `/teams/${id}` endpoint via the private request method to fetch team data.
    async getTeam(id: string): Promise<SingleResponse<Team>> { return this.request<SingleResponse<Team>>('GET', `/teams/${id}`); }
  • TypeScript interface defining the structure of a Team object returned by the Pylon API.
    export interface Team { id: string; name: string; users: { email: string; id: string }[]; }
  • Private HTTP request utility method used by getTeam to make authenticated API calls to Pylon.
    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