Skip to content

Refactor tool schema default handling and error responses for consistency across MCP tools - #8287

Merged
andypalmi merged 2 commits into
feat/extend-mcp-tool-feature-setfrom
feat/extend-mcp-tool-feature-set-addendum
Aug 26, 2026
Merged

Refactor tool schema default handling and error responses for consistency across MCP tools#8287
andypalmi merged 2 commits into
feat/extend-mcp-tool-feature-setfrom
feat/extend-mcp-tool-feature-set-addendum

Conversation

@cstns

@cstns cstns commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Description

Related Issue(s)

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • Link to Changelog Entry PR, or note why one is not needed.

Labels

  • Includes a DB migration? -> add the area:migration label

@cstns
cstns requested a review from andypalmi August 26, 2026 12:47
@cstns cstns self-assigned this Aug 26, 2026
@cstns
cstns deployed to staging August 26, 2026 12:51 — with GitHub Actions Active
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.85%. Comparing base (d9e8d19) to head (ad7c5a9).

Files with missing lines Patch % Lines
forge/comms/platformAutomation.js 88.88% 1 Missing ⚠️
Additional details and impacted files
@@                         Coverage Diff                          @@
##           feat/extend-mcp-tool-feature-set    #8287      +/-   ##
====================================================================
+ Coverage                             76.78%   76.85%   +0.07%     
====================================================================
  Files                                   458      458              
  Lines                                 24395    24374      -21     
  Branches                               6478     6474       -4     
====================================================================
+ Hits                                  18732    18733       +1     
+ Misses                                 5663     5641      -22     
Flag Coverage Δ
backend 76.85% <96.29%> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andypalmi

Copy link
Copy Markdown
Contributor

Fixed here, all check out:

  • limit/page required-despite-default: genuine zod chaining-order gotcha (.optional().default(x) vs .default(x).optional()), nice catch, and the new catalog_spec.js invariant test guards against it recurring on a future tool.
  • getLiveCachedState(args.hostedInstanceId)getLiveCachedState(device.id) in devices.js: real bug, not a style change - every row in a device list was hitting the same wrong cache key before this.
  • platform_get_remote_instance_status description: now matches what the handler actually does (cache-first, MQTT only on a miss), the old description was just wrong.
  • platform_create_remote_instance_snapshot removal: genuine duplicate, platform_create_instance_snapshot already covers instanceType: 'remote' against the same endpoint.
  • platform_get_current_user removal: genuine duplicate of platform_get_active_user, no other references to it anywhere in the repo.

Still open from the report, not touched by this PR:

  • Reversed logs pagination direction
  • Double-encoded includeStatus errors
  • Inconsistent hostedInstanceId validation across tools
  • count meaning different things depending on scope
  • platform_get_active_browser_session annotated as a write tool
  • sort/orderByMostRecentFlows duplication
  • Inconsistent teamId descriptions
  • Missing idempotentHint/openWorldHint annotations
  • Hand-copied STATE_GROUPS

Nothing here is made worse by this PR, just not addressed yet.

Want to keep going on those in this PR, split them into another one, or should I put together a PR on top of this one that merges into base once it lands?

Co-authored-by: andypalmi <andrea@flowfuse.com>
@andypalmi
andypalmi merged commit de0c2fc into feat/extend-mcp-tool-feature-set Aug 26, 2026
6 of 10 checks passed
@andypalmi
andypalmi deleted the feat/extend-mcp-tool-feature-set-addendum branch August 26, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants