Skip to main content
Glama
michaelahern

Airthings Consumer MCP Server

by michaelahern

airthings

Retrieve current air quality data and device information from Airthings monitors to assess indoor environmental conditions.

Instructions

Get information about my Airthings air quality monitoring devices and their current sensor readings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'airthings' tool handler is registered using server.tool and defined in src/server.ts. It fetches devices and sensor readings from the Airthings API and formats them as a text response.
    server.tool(
        'airthings',
        'Get information about my Airthings air quality monitoring devices and their current sensor readings.',
        async () => {
            const devices = await client.getDevices();
            const sensors = await client.getSensors(SensorUnits.Imperial);
    
            const lines: string[] = [];
            devices.devices.forEach((d) => {
                lines.push(`${d.name} is an Airthings ${d.type.replace(/_/g, ' ').toLowerCase().replace(/\b\w/g, char => char.toUpperCase())}`
                    + ` with serial number ${d.serialNumber} that supports the following air quality sensors: ${d.sensors.join(', ')}.`);
    
                const sensorData = sensors.results.find(r => r.serialNumber === d.serialNumber);
                if (sensorData && sensorData.recorded) {
                    lines.push(`Current air quality sensor readings for ${d.name}:`);
                    sensorData.sensors.forEach((s) => {
                        lines.push(`- ${s.sensorType}: ${s.value}${s.unit}`);
                    });
                }
                else {
                    lines.push(`No current readings are available for ${d.name}.`);
                }
    
                lines.push('');
            });
    
            return {
                content: [{
                    type: 'text',
                    text: lines.join('\n')
                }]
            };
        }
    );
Behavior2/5

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

No annotations are provided, so the description must carry full behavioral disclosure. It mentions 'current' sensor readings implying real-time data, but lacks critical details: whether it returns all devices or requires selection, caching behavior, rate limits, offline device handling, or what specific sensor types (CO2, radon, etc.) are included.

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

Conciseness4/5

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

Single sentence with no redundant words. Information density is high. The sentence structure front-loads the action ('Get information') and immediately qualifies the scope, making it easy to parse.

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

Completeness3/5

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

Without an output schema or annotations, the description should compensate by describing the return structure or data freshness guarantees. It mentions both devices and readings but doesn't clarify if this returns a list, single device, or structured sensor data, leaving ambiguity about the response format.

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

Parameters4/5

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

Baseline 4 applies as there are zero parameters. The description appropriately requires no parameter explanation since the schema is empty. No penalty for lack of parameter detail when none exist.

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

Purpose4/5

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

The description clearly identifies the resource (Airthings air quality monitoring devices) and what is retrieved (device information and current sensor readings). The verb 'Get' is slightly generic but the scope is specific and unambiguous.

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

Usage Guidelines2/5

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

No explicit guidance on when to invoke this tool versus alternatives. While the domain (air quality monitoring) implies usage context, there are no mentions of prerequisites, triggers like 'when user asks about indoor air quality', or conditions where this should be preferred over other environment tools.

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/michaelahern/airthings-consumer-mcp'

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