Skip to main content
Glama

get_account

Retrieve current user account information including name, ID, email, and role for Codecks project management access.

Instructions

Get current account info (name, id, email, role).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool registration for 'get_account' with metadata and handler that calls client.getAccount() and returns formatted JSON response
    export function registerReadTools(server: McpServer, client: CodecksClient): void { server.registerTool( "get_account", { title: "Get Account", description: "Get current account info (name, id, email, role).", inputSchema: z.object({}), }, async () => { try { const result = await client.getAccount(); return { content: [{ type: "text", text: JSON.stringify(finalizeToolResult(result)) }], }; } catch (err) { return { content: [ { type: "text", text: JSON.stringify(finalizeToolResult(handleError(err))), }, ], }; } }, );
  • Tool handler that executes the get_account logic by calling client.getAccount() and formatting the result with error handling
    async () => { try { const result = await client.getAccount(); return { content: [{ type: "text", text: JSON.stringify(finalizeToolResult(result)) }], }; } catch (err) { return { content: [ { type: "text", text: JSON.stringify(finalizeToolResult(handleError(err))), }, ], }; } },
  • Implementation of getAccount() method that queries the Codecks API to retrieve account info (id, name, email, role) and throws SetupError if account cannot be fetched
    async getAccount(): Promise<Record<string, unknown>> { const result = await query({ _root: [{ account: ["id", "name", "email", "role"] }], }); const acct = result.account as Record<string, unknown> | undefined; if (!acct) throw new SetupError("[TOKEN_EXPIRED] Could not fetch account."); return acct; }

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/rangogamedev/codecks-mcp'

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