Skip to main content
Glama

toggl_check_auth

Verify Toggl API connectivity and authentication status to ensure proper integration with time tracking workflows.

Instructions

Verify Toggl API connectivity and authentication is valid

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler logic for the 'toggl_check_auth' tool within the CallToolRequestSchema switch statement. It verifies authentication by calling api.getMe() and api.getWorkspaces(), masks the user's email for privacy, and returns a JSON response with authentication status, masked user info, and list of workspaces.
    case 'toggl_check_auth': { const me = await api.getMe(); const workspaces = await api.getWorkspaces(); const maskEmail = (e?: string) => { if (!e) return undefined as unknown as string; const [user, domain] = e.split('@'); if (!domain) return '***'; const u = user.length <= 2 ? '*'.repeat(user.length) : `${user[0]}***${user.slice(-1)}`; return `${u}@${domain}`; }; return { content: [{ type: 'text', text: JSON.stringify({ authenticated: true, user: { id: (me as any).id, email: maskEmail((me as any).email), fullname: (me as any).fullname }, workspaces: workspaces.map(w => ({ id: w.id, name: w.name })), }, null, 2) }] }; }
  • Tool schema and registration entry for 'toggl_check_auth' in the tools array. Defines the tool name, description, and empty input schema (no parameters required). This array is served via the ListToolsRequestSchema handler.
    { name: 'toggl_check_auth', description: 'Verify Toggl API connectivity and authentication is valid', inputSchema: { type: 'object', properties: {}, required: [] }, },
  • src/index.ts:386-388 (registration)
    Registration of the tool list handler using server.setRequestHandler for ListToolsRequestSchema, which returns the 'tools' array containing the 'toggl_check_auth' schema.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { 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/verygoodplugins/mcp-toggl'

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