MCP search_metadata entity_type=metric returns dashboards instead of metrics
Affected module
Backend
Describe the bug
If I invoke the MCP tool search_metadata, the results I get are not "entityType": "metric" :
xh --stream POST https://HOST/mcp -A bearer -a MYJWTTOKEN Accept:"application/json, text/event-stream" jsonrpc=2.0 id:=2 method=tools/call params:='{"name": "search_metadata", "arguments":{"entityType":"metric", "query": "test"}}'| jq '.result.content[].text|fromjson|.results[].entityType'
"dashboard"
"dashboard"
"dashboard"
"dashboard"
"dashboard"
"table"
"dashboard"
"dashboard"
"dashboard"
"dashboard"
To Reproduce
query with `"entityType": "metric"``:
xh --stream POST https://HOST/mcp -A bearer -a MYJWTTOKEN Accept:"application/json, text/event-stream" jsonrpc=2.0 id:=2 method=tools/call params:='{"name": "search_metadata", "arguments":{"entityType":"metric", "query": "test"}}'| jq '.result.content[].text|fromjson|.results[].entityType'
Expected behavior
I expect only result of the specified entityType like when I specify "entityType": "table":
xh --stream POST https://HOST/mcp -A bearer -a MYJWTTOKEN Accept:"application/json, text/event-stream" jsonrpc=2.0 id:=2 method=tools/call params:='{"name": "search_metadata", "arguments":{"entityType":"table", "query": "test"}}'| jq '.result.content[].text|fromjson|.results[].entityType'
"table"
"table"
"table"
"table"
"table"
"table"
"table"
"table"
"table"
"table"
OS
No response
Python version
No response
OpenMetadata version
1.11.11
OpenMetadata Ingestion package version
No response
Additional context
No response
Pre-submission checklist
- [x] I searched for duplicate issues.
- [x] I removed credentials, hostnames, emails, and other sensitive data from logs and config.
hey @ecerulm can i work on this issue? please assign it to me
@tazsq, I'm not affiliated with OMD but I'm pretty sure you can just create a PR for this and the committers of this project will look at it.
@ecerulm please upgrade to latest OpenMetadata version and test mcp there, we had a couple of improvements in the last few months. Also your issue is fixed here: https://github.com/open-metadata/OpenMetadata/pull/28698