Skip to content

fix(database): improve error handling, password generation, and clean up unused tool options#57

Open
martin-helmich wants to merge 10 commits into
mainfrom
fix/database-api-error-details
Open

fix(database): improve error handling, password generation, and clean up unused tool options#57
martin-helmich wants to merge 10 commits into
mainfrom
fix/database-api-error-details

Conversation

@martin-helmich

@martin-helmich martin-helmich commented Jun 2, 2026

Copy link
Copy Markdown
Member

Summary

API Error Handling

  • Adds helper functions to extract structured error details from Mittwald API responses
  • Database operations now return meaningful validation error messages instead of generic "Request failed with status code 400"
  • Example: Validation error: version: must be one of '8.0', '8.4'; userPassword: must be at least 16 characters

MySQL Password Generation

  • Fixed auto-generated passwords to meet API validation requirements (min 8 chars, at least one special character, cannot start with -_;)
  • Improved password entropy by using full alphanumeric + special character set (~128 bits) instead of hex-only (~96 bits)
  • Updated tool description to document password requirements

Tool Parameter Cleanup

  • Clarified MySQL version parameter format (<major>.<minor>, e.g. 8.0)
  • Removed unused output format options from 78+ tool definitions and handlers:
    • output/outputFormat, extended, noHeader, noTruncate, noRelativeDates, csvSeparator
    • These options had no effect - all MCP tools return structured JSON regardless of settings
    • Removed ~1,400 lines of dead code

Files Changed

  • Database tools (mysql/list, redis/list, versions, charsets, user-list, create)
  • Domain tools (list, dnszone/list, virtualhost-list)
  • Backup tools (list, schedule-list)
  • Cronjob, container, server, project, mail, org, extension, user, ssh, sftp, stack, volume, registry, conversation, and app tools

🤖 Generated with Claude Code

martin-helmich and others added 2 commits June 2, 2026 14:39
Previously, database operations returned generic "Request failed with status code 400"
errors without the actual validation messages from the API. Now the error handling
extracts structured error details including individual field validation errors.

Example output: "Validation error: version: must be one of '8.0', '8.4'"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@martin-helmich martin-helmich force-pushed the fix/database-api-error-details branch from cbda0c5 to b609629 Compare June 2, 2026 12:40
martin-helmich and others added 6 commits June 12, 2026 09:46
…hars

The auto-generated password for MySQL database creation was using hex-only
characters, which failed API validation requiring at least one special
character. Now generates passwords using full alphanumeric + special char
set (~128 bits entropy) that meet all API requirements, and documents the
password constraints in the tool description.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document that the version should be in '<major>.<minor>' format (e.g. '8.0')
instead of referencing a CLI command that isn't available via MCP.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
MySQL and Redis version list tools always return JSON regardless of
output format options. Remove unused parameters (output/outputFormat,
extended, noHeader, noTruncate, noRelativeDates, csvSeparator) since
they have no effect. Keep projectId for Redis as different projects
may have different versions available.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…h 1)

Remove unused output/outputFormat, extended, noHeader, noTruncate,
noRelativeDates, and csvSeparator options from tool definitions and
handlers. These options had no effect - all tools return structured
JSON regardless of settings.

Cleaned up: app/list, project/list, database tools (mysql/list,
redis/list, list, charsets, user-list), domain tools (list,
dnszone/list, virtualhost-list), backup tools (list, schedule-list),
and version tools (mysql/versions, redis/versions).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…h 2)

Cleaned up: cronjob/list, cronjob/execution-list, container/list,
server/list.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…h 3)

Remove unused output/outputFormat, extended, noHeader, noTruncate,
noRelativeDates, and csvSeparator options from remaining 24 tool
definitions and handlers.

Cleaned up: user/ssh-key/list, volume/list, stack/ps, user/api-token/list,
user/session/list, ssh/user-list, stack/list, sftp/user-list,
project/membership-list, project/membership-list-own, registry/list,
project/invite-list, project/invite-list-own, mail/address/list,
mail/deliverybox/list, org/invite-list, org/invite-list-own,
extension/list, extension/list-installed, database/redis/get,
database/mysql/user-get, conversation/list, conversation/categories,
app/list-upgrade-candidates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@martin-helmich martin-helmich changed the title fix(database): extract and pass through API validation error details fix(database): improve error handling, password generation, and clean up unused tool options Jun 12, 2026
martin-helmich and others added 2 commits June 12, 2026 11:42
…deploy

- Add compose-to-mittwald.ts converter that parses docker-compose YAML
  and converts to Mittwald declarative stack API format
- Add declareStack library function using @mittwald/api-client types
  (ContainerServiceDeclareRequest, ContainerVolumeDeclareRequest)
- Update mittwald_stack_deploy tool to accept composeYaml string content
  instead of file path (works for remote MCP server scenarios)
- Converter supports: services with image, ports, environment, volumes,
  command, entrypoint; warns about unsupported features (networks, deploy,
  healthcheck, depends_on)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add explicit instruction in mittwald_stack_deploy description to first
read the existing stack configuration before updating, to prevent
accidental deletion of existing services/volumes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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