Keep Data Query (keep-query) for Openclaw

An AI agent skill designed to query fitness records, body measurements, and health statistics directly from the Keep App using natural language.

liuchuanhao1
v1.0.5
Jun 4, 2026
0
531
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install keep-query

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install keep-query using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Keep Data Query (keep-query)?

The Keep Data Query tool is a powerful utility designed for AI agents operating on the Model Context Protocol (MCP) framework. It empowers agents to seamlessly fetch, view, and analyze personal fitness records, body composition measurements, and overall health statistics directly from the Keep App ecosystem. As a primary interface within the Openclaw Skills directory, this integration translates user queries—ranging from running distances to body fat trends—into structured data requests, providing a unified access point for personal wellness telemetry.

By leveraging this tool, developers can build agents capable of retrieving historical workout data, daily step counts, sleep cycles, and physiological metrics without complex manual exporting. Designed to preserve user context and respect raw upstream records, this integration serves as a secure bridge between Keep and your intelligent agent workflows.

Keep Data Query (keep-query) Use Cases

  • Retrieving historical workout logs, such as running, cycling, or swimming distances and times.
  • Monitoring physiological body metrics like body weight, body fat percentage, and waist measurements.
  • Querying daily health stats including step counts, heart rate variations, blood pressure, and sleep duration.
  • Checking recent dietary habits and menstrual cycle records within the Keep app.
  • Extracting specific statistical trends over custom timeframes, such as weekly totals or monthly exercise durations.

How Keep Data Query (keep-query) Works

  1. Authentication Check: The agent checks local credentials before calling any tools. If credentials are missing or expired (returning AUTH_REQUIRED or TOKEN_EXPIRED), it triggers the standard QR code login workflow.
  2. Natural Language Query: The agent routes the user's raw, unparsed request directly to the query_tool via the text parameter, allowing the upstream Keep server to classify and calculate metrics.
  3. Result Presentation: The skill returns structured health and fitness data, which the agent formats and presents exactly as received, ensuring high factual accuracy.
  4. App Redirection: For advanced physiological analysis or diet planning, the agent directs the user to the Keep App rather than generating unauthorized advice.

Keep Data Query (keep-query) Setup

The keep-query skill can be integrated into Openclaw Skills using two main runner configurations:

All queries and authentication tools can be executed using the CLI script runner. Keep the {baseDir} placeholder exactly as written; it will be automatically resolved by the runner:

# Generate QR Code for login
node {baseDir}/scripts/mcp-call.js get_qrcode '{"authType":"openclaw"}'

# Wait for scan authorization
node {baseDir}/scripts/login-wait.js <qrcodeId>

# Persist token
node {baseDir}/scripts/persist_auth.js --token='<jwt>' --username='<name>'

# Run the query tool
node {baseDir}/scripts/mcp-call.js query_tool '{"text":"查询我本周的运动详情"}'

Method 2: Native Model Context Protocol (MCP)

Configure the skill inside your MCP settings if your runner supports streamable-http connections:

{
  "mcpServers": {
    "keep-query": {
      "url": "https://mcp.gotokeep.com/skills-mcp-gateway-page/v1",
      "transport": "streamable-http",
      "headers": {
        "Authorization": "Bearer ${env:keep_auth_token}"
      }
    }
  }
}

Keep Data Query (keep-query) Data Schema & Taxonomy

Available Tools

Tool Name Parameters Auth Required Description
get_qrcode {"authType": "string"} No Initiates the login flow by generating a Keep login QR code.
check_login {"qrcodeId": "string"} No Checks the QR code scanning status. Best utilized internally through scripts.
revoke_auth {} Yes Revokes current authentication token on the server.
query_tool {"text": "string"} Yes Routes raw natural language queries to fetch exercise, body, or health stats.

Common Error Codes

Error Code Meaning Resolution
AUTH_REQUIRED Missing or invalid login state. Re-run the QR code authentication workflow.
TOKEN_EXPIRED Expired Keep JWT token. Re-run the QR code authentication workflow.
RATE_LIMITED Too many requests sent. Wait for the period specified in retry_after before retrying.
UPSTREAM_ERROR Keep server-side error. Inform user and retry later.
INVALID_ARGS Improper usage of mcp-call.js. Verify tool parameters and JSON formatting.

Keep Data Query (keep-query) Advanced Features

  • Robust QR Code Authentication Loop: Features a dual-path authorization mechanism using both visual QR codes (Markdown rendered images) and a fallback redirection URL (redirectUrl) for environments where images cannot load.
  • Unparsed Query Engine: Routes raw conversational text to the Keep server instead of pre-classifying it client-side, reducing analytical overhead and letting upstream models parse exact data categories.
  • Built-in Session Persistence: Uses persist_auth.js to store JWT tokens locally, optimizing response times and avoiding redundant scan requests.
  • Precise Data Fidelity: Strict policy flags prevent the AI agent from hallucinating health insights, directing users to the Keep App for professional-grade health analysis while retaining the accuracy of Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*