Skip to main content
Glama

Get ThermoWorks Devices

thermoworks_get_devices
Read-onlyIdempotent

Retrieve connected ThermoWorks devices for BBQ temperature monitoring. Lists serial numbers, names, and device types to enable real-time tracking during cooking.

Instructions

Get a list of all ThermoWorks devices connected to your account.

Requires authentication first via thermoworks_authenticate.

Args:

  • response_format: 'markdown' or 'json'

Returns: List of devices with serial numbers, names, and types.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
response_formatNoOutput formatmarkdown

Implementation Reference

  • MCP tool handler: checks authentication, fetches devices using ThermoWorksClient, returns formatted markdown list or JSON.
    async (params: GetDevicesInput) => {
      try {
        const client = getThermoWorksClient();
    
        if (!client.isAuthenticated()) {
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: "Not authenticated. Use `thermoworks_authenticate` first.",
              },
            ],
          };
        }
    
        const devices = await client.getDevices();
    
        if (params.response_format === "json") {
          return {
            content: [{ type: "text", text: JSON.stringify(devices, null, 2) }],
            structuredContent: { devices },
          };
        }
    
        let markdown = `## 📱 ThermoWorks Devices\n\n`;
        if (devices.length === 0) {
          markdown += `No devices found.\n`;
        } else {
          for (const device of devices) {
            markdown += `### ${device.name}\n`;
            markdown += `- **Type:** ${device.type}\n`;
            markdown += `- **Serial:** ${device.serial}\n\n`;
          }
        }
    
        return {
          content: [{ type: "text", text: markdown }],
        };
      } catch (error) {
        const message = error instanceof Error ? error.message : "Failed to get devices";
        return {
          isError: true,
          content: [{ type: "text", text: `Error: ${message}` }],
        };
      }
    }
  • src/index.ts:1130-1150 (registration)
    Registers the thermoworks_get_devices tool with the MCP server, specifying metadata, input schema, and annotations.
    server.registerTool(
      "thermoworks_get_devices",
      {
        title: "Get ThermoWorks Devices",
        description: `Get a list of all ThermoWorks devices connected to your account.
    
    Requires authentication first via thermoworks_authenticate.
    
    Args:
      - response_format: 'markdown' or 'json'
    
    Returns:
      List of devices with serial numbers, names, and types.`,
        inputSchema: GetDevicesSchema,
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: true,
        },
      },
  • Zod schema defining the tool's input parameters (response_format: markdown or json).
    export const GetDevicesSchema = z
      .object({
        response_format: ResponseFormatSchema.describe("Output format"),
      })
      .strict();
    
    export type GetDevicesInput = z.infer<typeof GetDevicesSchema>;
  • Low-level function to fetch the list of user devices from Firebase Realtime Database using ID token.
    export async function getDevices(
      idToken: string,
      userId: string,
      useSmokeLegacy = false
    ): Promise<ThermoWorksDevice[]> {
      const config = useSmokeLegacy ? THERMOWORKS_SMOKE_FIREBASE_CONFIG : THERMOWORKS_FIREBASE_CONFIG;
      
      // ThermoWorks stores device data under the user's ID
      const response = await fetch(
        `${config.databaseURL}/users/${userId}/devices.json?auth=${idToken}`
      );
    
      if (!response.ok) {
        throw new Error("Failed to fetch devices. Token may be expired.");
      }
    
      const data = await response.json();
      
      if (!data) {
        return [];
      }
    
      // Convert Firebase object to array
      return Object.entries(data).map(([serial, device]: [string, unknown]) => {
        const d = device as Record<string, unknown>;
        return {
          serial,
          name: (d.name as string) || serial,
          type: (d.type as string) || "Unknown",
          lastUpdated: new Date(),
        };
      });
    }
  • ThermoWorksClient.getDevices(): Ensures valid token and delegates to low-level getDevices implementation.
    async getDevices(): Promise<ThermoWorksDevice[]> {
      await this.ensureValidToken();
      return getDevices(this.idToken!, this.userId!, this.useSmokeLegacy);
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already indicate this is a read-only, non-destructive, idempotent, and open-world operation. The description adds valuable context by specifying the authentication requirement, which is not covered by annotations. However, it doesn't mention potential rate limits, error conditions, or pagination behavior, leaving some behavioral aspects undisclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in the first sentence, followed by prerequisite information and parameter/return details in a structured format. Every sentence serves a clear purpose without redundancy, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one optional parameter), rich annotations, and no output schema, the description is mostly complete. It covers purpose, prerequisites, parameters, and return values. However, it lacks details on output structure (e.g., device attributes beyond serial numbers, names, and types) and error handling, which could enhance completeness for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the parameter 'response_format' fully documented in the schema. The description adds minimal value by restating the enum options ('markdown' or 'json') and noting it affects output format, but doesn't provide additional semantics beyond what the schema already covers. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get a list') and resource ('all ThermoWorks devices connected to your account'), distinguishing it from siblings like thermoworks_get_live_readings (which focuses on readings rather than devices) and thermoworks_authenticate (which handles authentication). It precisely defines the tool's scope without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool by specifying the prerequisite 'Requires authentication first via thermoworks_authenticate,' providing clear guidance on the necessary context. It also implies usage for listing devices rather than analyzing data or performing other operations covered by sibling tools, though it doesn't explicitly name alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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