Replace individual tools with 2 generic tools powered by live OpenAPI spec#25
Open
limehawk wants to merge 1 commit intoDokploy:mainfrom
Open
Replace individual tools with 2 generic tools powered by live OpenAPI spec#25limehawk wants to merge 1 commit intoDokploy:mainfrom
limehawk wants to merge 1 commit intoDokploy:mainfrom
Conversation
6748292 to
9446e07
Compare
dokploy-api executes any operation; dokploy-api-schema returns parameter schemas. Both derive from the live Dokploy OpenAPI spec at startup — zero maintenance when endpoints change. Covers all 454 operations across 44 categories.
9446e07 to
1d887ea
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces all individual MCP tools with 2 generic tools that provide full coverage of the entire Dokploy API (454 operations across 44 categories) with zero maintenance overhead.
dokploy-api— Executes any Dokploy API operation. HTTP method (GET/POST) is auto-detected from the live OpenAPI spec.dokploy-api-schema— Discovers available operations and their parameter schemas by introspecting the OpenAPI spec. Resolves $ref, allOf, and oneOf so LLMs get complete type information.Both tools share a single cached spec fetch, so the server hits the Dokploy API exactly once on first use.
Why this approach?
The current MCP server has ~32 hand-coded tools covering 5 categories. This takes a different approach — no individual tool files, no static operation lists, no manual method mapping:
When Dokploy adds new API endpoints, this server picks them up on next restart. No code changes, no PRs, no maintenance.
What changed
src/mcp/tools/api.ts— generic API executor (138 lines)src/mcp/tools/apiSchema.ts— schema discovery with recursive $ref resolution (227 lines)src/utils/openApiSpec.ts— shared OpenAPI spec cache (75 lines)toolFactory.tsNet: -3,239 lines, full API coverage, zero maintenance.
Tested against live Dokploy server
Verified across 25+ categories including:
Test plan
dokploy-apiwithsettings.health(no-param GET)dokploy-apiwithproject.all(list operation)dokploy-apiwithproject.createthenproject.remove(POST mutation lifecycle)dokploy-api-schemawith no params (category overview — expect 44 categories)dokploy-api-schemawithoperation: "application.create"(full parameter schema with types and required flags)