Skip to content

Conversation

@DaleSeo
Copy link
Contributor

@DaleSeo DaleSeo commented Dec 15, 2025

Summary

This fixes the issue where tool parameters with anyOf schemas didn't show any description text, which left users without guidance on acceptable values. This PR adds placeholder description text to make it consistent with the fields of other types.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Refactoring (no functional changes)
  • Test updates
  • Build/CI improvements

Changes Made

Adds placeholder prop support to JsonEditor component and passes schema description as placeholder to JsonEditor.

Related Issues

Only addresses the issue of missing description for anyOf fields in #915.

Testing

  • Tested in UI mode
  • Tested in CLI mode
  • Tested with STDIO transport
  • Tested with SSE transport
  • Tested with Streamable HTTP transport
  • Added/updated automated tests
  • Manual testing performed

Test Results and/or Instructions

Tested with the following tool with anyOf input schemas:

{
  "name": "test_anyof",
  "description": "Test tool with anyOf string|integer parameter",
  "inputSchema": {
    "type": "object",
    "properties": {
      "factor": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "minimum": 1,
            "type": "integer"
          }
        ],
        "default": 1,
        "description": "Either a string or positive integer"
      }
    }
  },
  "outputSchema": {
    "type": "object",
    "properties": {
      "result": {
        "type": "string"
      }
    },
    "required": [
      "result"
    ],
    "x-fastmcp-wrap-result": true
  },
  "_meta": {
    "_fastmcp": {
      "tags": []
    }
  }
}
Before After
2025-12-14 at 19 18 26 2025-12-14 at 19 16 58

Checklist

  • Code follows the style guidelines (ran npm run prettier-fix)
  • Self-review completed
  • Code is commented where necessary
  • Documentation updated (README, comments, etc.)

Breaking Changes

None. This is a pure UI enhancement that adds missing information.

Additional Context

@DaleSeo DaleSeo marked this pull request as ready for review December 15, 2025 00:24
@DaleSeo
Copy link
Contributor Author

DaleSeo commented Dec 18, 2025

Hi @olaservo, when you get a chance, could you take a look at this PR? Thanks!

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