mirror of
https://github.com/open-webui/mcpo.git
synced 2026-11-05 01:27:39 +00:00
[GH-ISSUE #296] issue: _process_schema_property crashes on list-valued schema fragments: AttributeError: 'list' object has no attribute 'get' #133
Labels
No labels
bug
can't reproduce
documentation
enhancement
good first issue
help wanted
invalid
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-webui/mcpo#133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pschaer on GitHub (May 16, 2026).
Original GitHub issue: https://github.com/open-webui/mcpo/issues/296
Check Existing Issues
mcpo Version
v0.0.20
Open WebUI Version (if applicable)
N/A
Operating System
Docker (Linux Container)
Browser (if applicable)
N/A
Confirmation
README.md.Expected Behavior
mcpo should start successfully and expose
@brave/brave-search-mcp-servertools via OpenAPI, just like it does for other MCP servers.Actual Behavior
mcpo crashes during startup when parsing the Brave server's tool schemas. The
_process_schema_propertyfunction receives alistobject where it expects adict, causing:The server fails to connect and mcpo logs it in the startup summary.
Steps to Reproduce
AttributeErrorcrash in logs.Logs & Screenshots
Full traceback:
Workaround that works: pin to
1.3.7and force stdio:Additional Information
The crash occurs because
_process_schema_propertytypes itsprop_schemaparameter asDict[str, Any]and calls.get("type")unconditionally. However, valid JSON Schema Draft 7 allowsitemsto be either a single schema object or an array of schema objects (tuple validation). When mcpo recurses into the latter, it passes a Pythonlistback into_process_schema_property, triggering theAttributeError.Suggested fix: add an
isinstance(items_schema, list)guard in theprop_type == "array"branch insidemcpo/utils/main.py.@SaurabhMaydeo commented on GitHub (Jun 26, 2026):
Opened #300 to fix this. It adds the
isinstance(items_schema, list)guard you suggested, and also covers the Draft 2020-12prefixItemsform and non-object elements, with regression tests. Falls back toList[Any]for the empty/odd cases rather than crashing.@veno501 commented on GitHub (Aug 9, 2026):
I have the same issue, waiting for this to be merged