Skip to content

feat: add GET /tool_servers/status health-check endpoint#1

Open
IVVI0927 wants to merge 1 commit into
devfrom
feat/tool-server-health-status
Open

feat: add GET /tool_servers/status health-check endpoint#1
IVVI0927 wants to merge 1 commit into
devfrom
feat/tool-server-health-status

Conversation

@IVVI0927

Copy link
Copy Markdown
Owner

Changelog Entry

Description

Added

  • Added GET /api/v1/configs/tool_servers/status.
  • Added per-server health status reporting with:
    • server ID
    • server name
    • server URL
    • server type
    • status: ok, error, or skipped
    • latency in milliseconds
    • discovered tool/path count
    • error message when applicable
  • Added concurrent health checks for configured tool servers.
  • Added a short timeout for health checks so one unavailable server does not block the full response.
  • Added handling for OAuth-protected MCP servers by returning skipped when they cannot be probed without an active user session.

Changed

  • Reused existing MCP and OpenAPI tool server connection logic to support the new status endpoint.
  • Normalized a few static error messages in the configs router.

Additional Information

  • This endpoint is read-only and requires admin privileges.
  • No database changes, new dependencies, or configuration changes are required.

Contributor License Agreement

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.

Probe all configured tool servers concurrently and return their
live status (ok / error / skipped) in a single request.

Before this change, admins had to call POST /tool_servers/verify
once per server, supplying the full connection body each time.
There was no way to get an at-a-glance view of all servers.

The new endpoint:
- Probes MCP and OpenAPI servers in parallel via asyncio.gather
- Reports latency_ms and tools_count on success
- Returns status=skipped for OAuth servers that require a user session
- Uses a 5-second per-server timeout to keep responses snappy
- Requires admin privilege (consistent with existing /tool_servers routes)

Adds docs/tool-server-health-status.md documenting the API,
design decisions, and comparison with existing endpoints.
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.

1 participant