Skip to content

Commit adeba32

Browse files
committed
Add specificity to tool descriptions to delineate
1 parent 6d5db43 commit adeba32

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed
Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
1-
This tool retrieves the lineage of a specified dbt model in the local development environment.
1+
get_model_lineage_dev
22

3+
<instructions>
4+
Retrieves the model lineage of a specific dbt model, it allows for upstream, downstream, or both. These are the models that depend on the specified model.
5+
6+
You can provide either a model_name or a uniqueId, if known, to identify the model. Using uniqueId is more precise and guarantees a unique match, which is especially useful when models might have the same name in different projects.
7+
This specifically ONLY pulls from the local development manifest. If you want production lineage, use `get_model_children` or `get_model_parents` instead.
8+
</instructions>
9+
10+
<parameters>
11+
model_id: str => Either the uniqueId or the `identifier` of the dbt model to retrieve lineage for.
12+
direction: Literal["parents", "children", "both"] = "both" => The direction of lineage to retrieve. "parents" for upstream models, "children" for downstream models, and "both" for both directions.
13+
exclude_prefixes: tuple[str, ...] = ("test.", "unit_test."), => A tuple of prefixes to exclude from the lineage results. Assets with identifiers starting with any of these prefixes will be ignored.
14+
recursive: bool = False => Whether to retrieve lineage recursively. If set to True, it will fetch all levels of lineage in the specified direction(s).
15+
</parameters>
16+
17+
<examples>
18+
1. Getting children for a model by name:
19+
get_model_lineage_dev(model_id="customer_orders", direction="children")
20+
21+
2. Getting parents for a model by uniqueId (more precise):
22+
get_model_lineage_dev(model_id="model.my_project.customer_orders", direction="parents")
23+
24+
3. Getting both upstream and downstream lineage recursively and including tests:
25+
get_model_lineage_dev(model_id="model.my_project.customer_orders", direction="both", exclude_prefixes=(), recursive=True)
26+
</examples>

src/dbt_mcp/prompts/discovery/get_model_children.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Retrieves the child models (downstream dependencies) of a specific dbt model. These are the models that depend on the specified model.
33

44
You can provide either a model_name or a uniqueId, if known, to identify the model. Using uniqueId is more precise and guarantees a unique match, which is especially useful when models might have the same name in different projects.
5+
6+
This is specifically for retrieving model children from the production manifest. If you want development lineage, use `get_model_lineage_dev` instead.
57
</instructions>
68

79
<parameters>

src/dbt_mcp/prompts/discovery/get_model_parents.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Retrieves the parent models of a specific dbt model. These are the models that t
44
You can provide either a model_name or a uniqueId, if known, to identify the model. Using uniqueId is more precise and guarantees a unique match, which is especially useful when models might have the same name in different projects.
55

66
Returned parents include `resourceType`, `name`, and `description`. For upstream sources, also provide `sourceName` and `uniqueId` so lineage can be linked back via `get_all_sources`.
7+
8+
This is specifically for retrieving model parents from the production manifest. If you want development lineage, use `get_model_lineage_dev` instead.
79
</instructions>
810

911
<parameters>

0 commit comments

Comments
 (0)