Skip to content

speedtestResults ignores count: /api/speedtest/latest returns one result #160

Open

Description

@TMHSDigital

Summary

count is described as "Number of recent speedtest results to return", but the tool calls /api/speedtest/latest?limit=N, an endpoint that returns only the single latest result.

Where

  • mcp-server/src/tools/speedtestResults.ts:12, :19, :35

Details

Speedtest Tracker's legacy /api/speedtest/latest route takes no limit parameter. Listing results needs the token-protected /api/v1/results endpoint. (Confidence medium: based on the Speedtest Tracker API, not a live run.)

Impact

count: 10 returns one result, so trend questions are answered from a single sample.

Steps to reproduce

  1. Call homelab_speedtestResults with { "count": 10 }: one result object is returned

Suggested fix

Use the paginated results endpoint with an API token setting (for example HOMELAB_SPEEDTEST_TOKEN), or remove count and describe the tool as returning the latest result.

Acceptance criteria

  • Either count results are returned or the parameter is removed and the description matches

Getting started

  • Relevant files: mcp-server/src/tools/speedtestResults.ts, mcp-server/src/utils/service-http.ts
  • How to run tests: cd mcp-server && npm install && npm test (and npm run typecheck); structure tests: pip install -r requirements-test.txt && pytest tests/ -v
  • Conventions: see CLAUDE.md and CONTRIBUTING.md

Filed by repo-audit/full-audit at 636fefb. Severity: low. Effort: M. audit-key: bug|mcp-server/src/tools/speedtestResults.ts|count

Activity

  1. added
    bug
    severity: low
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugseverity: low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions