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 main handler implementation for the 'toggl_check_auth' tool. It checks authentication by fetching the current user and workspaces via the TogglAPI, masks the email for privacy, and returns structured JSON response.
    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) }] }; }
  • The schema definition for the 'toggl_check_auth' tool, specifying its name, description, and empty input schema (no parameters required).
    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 tools list handler, which exposes the 'toggl_check_auth' tool (among others) via ListToolsRequestSchema.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • src/index.ts:391-391 (registration)
    Registration of the CallToolRequestSchema handler, which includes the switch statement dispatching to the 'toggl_check_auth' case.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {

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