Skip to main content
Glama

thermoworks_check_auth

Verify ThermoWorks Cloud authentication status and token expiry for real-time BBQ temperature monitoring and cooking guidance.

Instructions

Check if you're currently authenticated with ThermoWorks Cloud.

Returns: Authentication status and token expiry time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that checks the current ThermoWorks authentication status using the client singleton. Returns formatted markdown response with structured content indicating authentication state, user ID, and token expiry.
    async (_params: CheckAuthStatusInput) => { const client = getThermoWorksClient(); const isAuth = client.isAuthenticated(); const authInfo = client.getAuthInfo(); if (!isAuth) { return { content: [ { type: "text", text: `## 🔒 Not Authenticated\n\nUse \`thermoworks_authenticate\` to connect to ThermoWorks Cloud.`, }, ], structuredContent: { authenticated: false }, }; } const output = { authenticated: true, userId: authInfo.userId, tokenExpiry: authInfo.tokenExpiry?.toISOString(), tokenValid: authInfo.tokenExpiry ? authInfo.tokenExpiry > new Date() : false, }; return { content: [ { type: "text", text: `## ✅ Authenticated\n\n**User ID:** ${authInfo.userId}\n**Token Expires:** ${authInfo.tokenExpiry?.toLocaleString()}`, }, ], structuredContent: output, }; }
  • src/index.ts:1074-1124 (registration)
    Registers the thermoworks_check_auth tool with the MCP server, providing title, description, input schema, annotations, and the inline handler function.
    server.registerTool( "thermoworks_check_auth", { title: "Check ThermoWorks Auth Status", description: `Check if you're currently authenticated with ThermoWorks Cloud. Returns: Authentication status and token expiry time.`, inputSchema: CheckAuthStatusSchema, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, }, async (_params: CheckAuthStatusInput) => { const client = getThermoWorksClient(); const isAuth = client.isAuthenticated(); const authInfo = client.getAuthInfo(); if (!isAuth) { return { content: [ { type: "text", text: `## 🔒 Not Authenticated\n\nUse \`thermoworks_authenticate\` to connect to ThermoWorks Cloud.`, }, ], structuredContent: { authenticated: false }, }; } const output = { authenticated: true, userId: authInfo.userId, tokenExpiry: authInfo.tokenExpiry?.toISOString(), tokenValid: authInfo.tokenExpiry ? authInfo.tokenExpiry > new Date() : false, }; return { content: [ { type: "text", text: `## ✅ Authenticated\n\n**User ID:** ${authInfo.userId}\n**Token Expires:** ${authInfo.tokenExpiry?.toLocaleString()}`, }, ], structuredContent: output, }; } );
  • Zod schema defining the input for the tool (empty object since no parameters are required). Includes TypeScript type inference.
    export const CheckAuthStatusSchema = z.object({}).strict(); export type CheckAuthStatusInput = z.infer<typeof CheckAuthStatusSchema>;
  • Singleton factory that provides the ThermoWorksClient instance used by the handler to check authentication status.
    export function getThermoWorksClient(useSmokeLegacy = false): ThermoWorksClient { if (!globalClient) { globalClient = new ThermoWorksClient(useSmokeLegacy); } return globalClient; }
  • ThermoWorksClient method called by the handler to determine if currently authenticated.
    isAuthenticated(): boolean { return this.idToken !== null && this.userId !== null; }

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/jweingardt12/bbq-mcp'

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