Skip to main content
Glama

get_body_metrics

Retrieve body composition data including skinfold measurements from the MCP Logger fitness tracking database to monitor physical progress over time.

Instructions

Get body metrics with skinfolds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_dateNo
to_dateNo
limitNo
offsetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The get_body_metrics function is decorated as an MCP tool and handles the retrieval of body metrics data including associated skinfolds from the database.
    def get_body_metrics(
        from_date: Optional[str] = None,
        to_date: Optional[str] = None,
        limit: int = 31,
        offset: int = 0,
    ) -> dict[str, list[dict[str, Any]]]:
        """Get body metrics with skinfolds."""
        conn = get_connection()
        cursor = conn.cursor()
    
        filters = []
        params = []
        if from_date:
            filters.append("date >= ?")
            params.append(_ensure_date(from_date))
        if to_date:
            filters.append("date <= ?")
            params.append(_ensure_date(to_date))
    
        base = "SELECT * FROM body_metrics"
        if filters:
            base += " WHERE " + " AND ".join(filters)
        base += " ORDER BY date DESC LIMIT ? OFFSET ?"
        params.extend([limit, offset])
    
        cursor.execute(base, params)
        metrics_list = []
        for row in cursor.fetchall():
            metrics = _row_to_dict(row)
            cursor.execute("SELECT site_name, mm FROM skinfolds WHERE body_metrics_id = ?", (metrics["id"],))
            skinfolds = {r["site_name"]: r["mm"] for r in cursor.fetchall()}
            metrics["skinfolds"] = skinfolds
            metrics_list.append(metrics)
    
        conn.close()
        return {"metrics": metrics_list}
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states it 'gets' data, implying a read-only operation, but doesn't mention permissions, rate limits, data format, or whether it returns paginated results. This is inadequate for a tool with parameters and potential complexity.

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 extremely concise with a single sentence, 'Get body metrics with skinfolds.', which is front-loaded and wastes no words. However, this brevity contributes to underspecification rather than clarity.

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

Completeness2/5

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

Given the tool has 4 parameters, 0% schema coverage, no annotations, but an output schema exists, the description is incomplete. It doesn't explain what the tool returns, how parameters affect results, or behavioral aspects like error handling. The output schema might cover return values, but the description lacks necessary context for effective use.

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

Parameters2/5

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

Schema description coverage is 0%, so the schema provides no parameter descriptions. The tool description adds no information about parameters like 'from_date', 'to_date', 'limit', or 'offset', leaving their purpose and format (e.g., date strings, pagination) unexplained. This fails to compensate for the low schema coverage.

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

Purpose3/5

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

The description states the tool 'Get body metrics with skinfolds' which indicates it retrieves body metrics data, but it's vague about what specific metrics or skinfold measurements are included. It doesn't distinguish from sibling tools like 'log_body_metrics' (which likely creates entries) or 'get_nutrition_day' (which retrieves nutrition data), leaving ambiguity about its unique scope.

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 guidance is provided on when to use this tool versus alternatives. For example, it doesn't specify if this is for historical data retrieval, how it differs from 'log_body_metrics' (which might be for inputting data), or any prerequisites like authentication needs. The description lacks context for tool selection.

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/JohnZolton/MCP-logger'

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