Skip to content

feat(discovery): consolidate 8 get_*_details tools into get_details#818

Open
theyostalservice wants to merge 1 commit into
patricky/di-4002-dbt-mcp-lineage-enrichfrom
patricky/di-4002-dbt-mcp-consolidate-tools
Open

feat(discovery): consolidate 8 get_*_details tools into get_details#818
theyostalservice wants to merge 1 commit into
patricky/di-4002-dbt-mcp-lineage-enrichfrom
patricky/di-4002-dbt-mcp-consolidate-tools

Conversation

@theyostalservice

Copy link
Copy Markdown
Contributor

Why

The 8 get_*_details Discovery tools (get_model_details, get_source_details, get_exposure_details, get_test_details, get_seed_details, get_snapshot_details, get_macro_details, get_semantic_model_details) are functionally identical — each is a thin wrapper that passes a fixed AppliedResourceType to ResourceDetailsFetcher.fetch_details. Having 8 separate tools means 8 descriptions and schemas sent as context on every turn. Consolidating them into one tool (get_details(resource_type, ...)) cuts 7 tool entries from every request.

What

  • Add get_details(resource_type, name, unique_id) that delegates to the existing ResourceDetailsFetcher — the resource_type parameter selects the dispatch path already inside the fetcher
  • Remove all 8 individual detail tools and their prompt files
  • The resource_type is already encoded in the unique_id prefix (e.g. model.pkg.name), so agents can always infer it without ambiguity
  • Update enum/toolset/README mappings; add parametrized unit test

Refs

DI-4002 | Stacks on #817


Drafted by Claude Opus 4.8 under the direction of @theyostalservice

@theyostalservice theyostalservice marked this pull request as ready for review June 22, 2026 19:05
@theyostalservice theyostalservice requested review from a team, b-per, jairus-m and jasnonaz as code owners June 22, 2026 19:05
Replaces get_model_details, get_source_details, get_exposure_details,
get_test_details, get_seed_details, get_snapshot_details, get_macro_details,
and get_semantic_model_details with a single get_details(resource_type, ...)
tool that dispatches to the existing ResourceDetailsFetcher.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@theyostalservice theyostalservice force-pushed the patricky/di-4002-dbt-mcp-lineage-enrich branch from 4417bdf to ad7ae8e Compare June 22, 2026 19:12
@theyostalservice theyostalservice force-pushed the patricky/di-4002-dbt-mcp-consolidate-tools branch from abb7335 to 2f05adf Compare June 22, 2026 19:12
@b-per

b-per commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Thanks.

Not a review in detail per-se for now, but comments that we'd need to clarify before getting this merged

  1. (most important) -- Now that we submitted apps to OpenAI and Anthropic for our MCP server we can't remove tools like we did before. We need a plan and steps to not break the integrations. This will require publishing a new version of the app/integration. I haven't thought about it in details but we might have to "deprecate" some older tools and have them return info that tells me to call the new ones.

  2. Instead of get_details, I think that get_node_details might be more relevant. A seed, a model, a test etc... are often referred to as nodes in the dbt framework. That would be a simple rename

@b-per

b-per commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

There are also a few extra dependencies to this work

  1. we'll need to update docs if/when this is merged
  2. we will need to update a seed in Internal Analytics to add the new tool

@wiggzz

wiggzz commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Now that we submitted apps to OpenAI and Anthropic for our MCP server we can't remove tools like we did before. We need a plan and steps to not break the integrations. This will require publishing a new version of the app/integration. I haven't thought about it in details but we might have to "deprecate" some older tools and have them return info that tells me to call the new ones.

@b-per do you have more details on this? is this because of tool list caching?

@b-per

b-per commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

@wiggzz : taken from the OpenAI docs

Treat the metadata exposed by your MCP server as a versioned API contract. When you scan a draft app’s MCP endpoint in the OpenAI Platform Dashboard, OpenAI stores the discovered metadata with that draft version. Submitting the version sends that stored snapshot for review. The snapshot includes:

The tool list, names, titles, and descriptions
Input and output schemas, annotations, and tool security schemes
Tool _meta fields, including UI resource references and visibility
Linked UI resource metadata, including content security policy (CSP) settings
MCP server instructions returned during initialization

Breaking changes to published apps are not currently supported. For example, removing or renaming a tool, making an input schema incompatible, or changing or removing the content served at a published UI resource URI can break the published version as soon as the server change deploys. Instead, make backward-compatible updates:

Add new tools, fields, or UI resources while continuing to honor the published contracts.
Submit the updated metadata as a new app version.
Publish the approved version and keep the old contracts available.

I created a PR a few days ago to catch those "breaking changes".
But while it will catch them, we don't have a process today to promote a version with breaking changes.

@theyostalservice

Copy link
Copy Markdown
Contributor Author

@b-per -
If we can't remove the old tools, I don't think this will be useful.

Adding more tools while just saying these are deprecated will only expand the amount of tool context, right?

It seems like deprecation solves for the use case of "the old tool is slow or has a known deficiency," not for our purpose here. Or is there something I'm missing with regards to deprecation?

@theyostalservice

Copy link
Copy Markdown
Contributor Author

An, nevermind, I just saw your slack post .

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.

3 participants