Area: API Issues
Sub-Area: MCP Server
Issue
MCP (Model Context Protocol) tools can return less information than the equivalent GraphQL queries, which can cause AI agents to give incorrect answers. Two separate causes were identified. First, in affected versions the get_entities MCP tool never requested domain, ownership, or structured properties for glossary terms from the backend, so those fields came back empty even though the same data is returned by the GraphQL glossaryTerm(urn) query. The same call on a dataset returned domain and ownership correctly, and the missing glossary term fields were not listed in omittedFields, so agents could mistake them for unset values. Second, the MCP search tool returned zero hits for glossary terms (for example with entity_type = glossaryTerm) because the MCP server applies the user's default View, which may exclude glossary terms.
Error Messages
No error messages are raised. Calls succeed but return incomplete or empty results.
You Might Be Asking
- Why does
get_entitiesreturn no domain, ownership, or structured properties for a glossary term when GraphQL returns them? - Why is a requested field missing from the response but not listed in
omittedFields? - Why does MCP
searchwithentity_type = glossaryTermreturn 0 results, even forquery: "*"? - Why does the DataHub agent's own search find the term when MCP search does not?
- Do the agent tools and the MCP tools share one search implementation?
Solution
Problem 1: Missing fields in get_entities for glossary terms
This was a confirmed bug. For glossary terms, the MCP tool never requested domain, ownership, or structured properties from the backend, which is also why they never appeared in omittedFields. The fix extends the same field coverage to glossary nodes, data products, containers, ML models and features, groups, tags, and assertions. The fix is available starting in DataHub Cloud v2.4.0.
- Upgrade to DataHub Cloud v2.4.0 or later. The fix was verified as available on a v2.4.1 environment.
- Update any custom agents to check the new
notReturnedFieldsentry in theget_entitiesresponse. When a caller names a field and the tool has no value for it, that field is now listed innotReturnedFields. This is a separate list fromomittedFields. Agents should treat a field listed there as "not returned", not as "no owner" or "no domain". - Until you can upgrade, retrieve these fields for glossary terms with the GraphQL
glossaryTerm(urn)query instead ofget_entities.
Problem 2: MCP search returns 0 results for glossary terms
The agent tools and the MCP tools share one search implementation, and the entity_type = glossaryTerm filter works the same way in both. The difference is the View:
- The MCP server applies a default View: the user's personal default View if one is set, otherwise the organization's default View.
- The DataHub agent and direct GraphQL calls do not apply a View.
If the default View does not include glossary terms, MCP search returns 0 results for every query, including *. To resolve this, do one of the following:
- Add Glossary Terms to the default View, or
- Clear the user's personal default View (Settings → Views) if the organization default View includes glossary terms.
To confirm this is the cause, check which View is set as the default for the affected user, then re-run the search.
Example: checking the new field in a response
{
"notReturnedFields": ["ownership", "domain"]
}The structure above is illustrative. Check for the notReturnedFields key in the response and treat any field named there as unavailable rather than unset.
Additional Notes
- The
get_entitiesfix ships in DataHub Cloud v2.4.0. The fix was not cherry-picked to v2.3.x. - The search behavior is a configuration matter (Views), not a code defect in the filter. Whether MCP and the chat agent should apply Views identically remained an open product question.
- Agents consuming
get_entitiesshould be instructed to checknotReturnedFields; a missing value should not be interpreted as an absent owner or domain. - If you build custom agents on top of MCP tools, validate their output against GraphQL for key metadata such as ownership and domain when answering governance questions.
Related Documentation
- None
Tags: mcp, get_entities, glossary-terms, search, views, default-view, notReturnedFields, omittedFields, graphql, ai-agents