You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(discovery): add get_node_details; deprecate the 8 get_*_details tools (#825)
# Why
The dbt Discovery toolset currently has 8 near-identical detail tools —
`get_model_details`, `get_source_details`, and 6 others — that are thin
wrappers around a single shared dispatcher keyed by resource type.
Having 8 separate tools means 8 separate descriptions in the MCP tool
list, increasing per-turn context overhead. A single
`get_node_details(resource_type, ...)` tool carries equivalent
functionality in one description slot.
# What
- Adds a new `get_node_details(resource_type, name, unique_id)` tool
that dispatches to the existing `ResourceDetailsFetcher.fetch_details`
based on `resource_type`. Supports all 8 resource types: model, source,
exposure, test, seed, snapshot, macro, semantic_model. (Named
`get_node_details` rather than `get_details` — `node` is the canonical
term dbt uses for a model, snapshot, etc., and `get_details` alone was
too generic.)
- Marks the 8 existing `get_*_details` tools as deprecated using the
`deprecated_description()` and `deprecation_meta()` helpers introduced
in the parent PR. All 8 remain fully registered and callable, but their
descriptions are now replaced with a short, blunt DEPRECATED line
pointing to `get_node_details` (rather than a banner prepended to the
full original description — a shorter description makes a model less
likely to pick the tool, speeding the usage soak), and their
`Tool._meta` carries `{"deprecated": true, "replacement":
"get_node_details"}`.
- The generated README now marks all 8 tools as deprecated
automatically, via #834's meta-driven `generate_docs.py` (merged to main
and picked up by rebasing this branch onto #824's latest state) — no
manual mapping needed on this end.
The underlying `ResourceDetailsFetcher` and its GraphQL queries are
unchanged — `get_node_details` uses the same data path.
# Notes
Stacked on #824 (enrich `get_lineage` + deprecate
`get_model_parents`/`get_model_children`). Merge #824 first, then
retarget this PR to `main`.
Drafted by claude-sonnet-4-6 and claude-opus-4-8 under the direction of
@theyostalservice
body: Add get_node_details tool for fetching details of any dbt resource type; deprecate the 8 type-specific get_*_details tools in favor of get_node_details
Retrieves full details for a dbt resource by type and name or unique ID.
2
+
3
+
Use this tool when you need the full schema, definition, or metadata for a specific dbt resource. The `resource_type` determines what fields are returned.
4
+
5
+
**Parameters:**
6
+
-`resource_type`: The type of dbt resource. One of: `model`, `source`, `exposure`, `test`, `seed`, `snapshot`, `macro`, `semantic_model`. The resource type is also encoded in the `unique_id` prefix (e.g. `model.my_project.orders` → `model`).
7
+
-`name`: The resource's short name (e.g. `orders`). Provide `name` or `unique_id`, not both.
8
+
-`unique_id`: The resource's fully qualified unique ID (e.g. `model.my_project.orders`). Preferred when available — avoids ambiguity when multiple resources share a name.
0 commit comments