Azure-Samples / Azure-Samples/azure_support_ticket_mcp
tools/list rejected by strict MCP clients: `serde_json::Value` output fields emit typeless JSON Schema
- Dominant language
- Rust
- Stars
- 2
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
### What happened?
Several tool Output structs expose `serde_json::Value` fields. With `schemars = "1"`, a bare `serde_json::Value` derives to the permissive boolean JSON Schema `true`, which has no `"type"`. Strict MCP clients validate every `outputSchema` property and reject any property schema that lacks a type. A single bad property fails the whole `tools/list` response, so the client loads zero tools even though the server connects fine.
The rmcp crate already guards the schema root ("MCP specification requires outputSchema to have root type 'object'"), but nested property schemas are not covered, so these `Value` fields slip through as typeless.
Offending fields (all Output structs deriving `JsonSchema`):
| File | Field |
|------|-------|
| `src/mcp/tools/create_ticket.rs` | `raw: serde_json::Value` |
| `src/mcp/tools/get_ticket.rs` | `raw: serde_json::Value` |
| `src/mcp/tools/reply_to_ticket.rs` | `intent: Value` |
| `src/mcp/tools/reply_to_ticket.rs` | `created: Option` |
| `src/mcp/tools/update_ticket.rs` | `patch_properties: Value` |
| `src/mcp/tools/update_ticket.rs` | `updated: Option` |
At runtime every one of these fields holds a JSON object (an ARM response body, a serialized intent struct, a PATCH body), so an object-typed schema is accurate — the schema is just currently under-specified.
### What did you expect to happen?
Every property in each tool's `outputSchema` carries an explicit `"type"`, so strict clients accept the `tools/list` response and all tools load.
### Steps to reproduce
1. Add the server to Claude Code (strict per-property `outputSchema` validation) and start a session.
```
curl -sSL https://github.com/artlovan/azure_support_ticket_mcp/releases/latest/download/install.sh | sh
claude mcp add azure-support-ticket-mcp -- "$(command -v azure-support-ticket-mcp)" serve
claude
```
2. Attempt to activate the MCP server through `/mcp` command menu.
3. Client connects, then fails tool discovery:
```
Reconnected to azure-support-ticket-mcp, but fetching tools failed: [
{ "path": ["tools", 5, "outputSchema", "properties", "raw"], "message": "Invalid input" },
{ "path": ["tools", 9, "outputSchema", "properties", "raw"], "message": "Invalid input" },
{ "path": ["tools", 25, "outputSchema", "properties", "created"], "message": "Invalid input" },
{ "path": ["tools", 25, "outputSchema", "properties", "intent"], "message": "Invalid input" },
{ "path": ["tools", 30, "outputSchema", "properties", "patch_properties"], "message": "Invalid input" }
]
```
4. Result: no tools available. The connection itself is healthy; only tool discovery fails.
### Version
0.1.1
### Operating system + arch
macOS (arm64)
### How was the binary installed?
install.sh
### Output of `azure-support-ticket-mcp doctor`
```text
azure-support-ticket-mcp doctor
------------------------------
app dir: /Users/user/.azure-support-ticket-mcp
cache path: /Users/user/.azure-support-ticket-mcp/cache.sqlite
cloud: AzurePublicCloud
drafts.store: memory
seed download: false
cache: OK (349 services, seed version "2024-04-01-2")
az cli: FOUND (/Users/artlogic/.local/opt/brew/bin/az)
arm reachable: OK (HTTP 400 Bad Request)
2026-07-07T14:30:26.359248Z INFO azure_support_ticket_mcp::bootstrap::doctor: doctor completed
```
### Relevant logs
```text
```
### Before submitting
- [x] I've searched existing issues and this hasn't been reported.
- [x] I've removed any secrets, tokens, or personal contact info from logs and screenshots.
Contributor guide
Research direction
Inspect the JsonSchema-derived Output structs in src/mcp/tools/create_ticket.rs, get_ticket.rs, reply_to_ticket.rs, and update_ticket.rs, focusing on the listed serde_json::Value fields. Reproduce the tools/list response with a strict MCP client and compare each property schema. Done means every listed output property has an explicit object type and strict clients load all tools.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100