@@ -38,9 +38,7 @@ Use the helpers in `src/dbt_mcp/tools/deprecation.py`:
3838from dbt_mcp.tools.deprecation import deprecated_description, deprecation_meta
3939
4040@dbt_mcp_tool (
41- description = deprecated_description(
42- get_prompt(" discovery/get_model_parents" ), replacement = " get_lineage"
43- ),
41+ description = deprecated_description(replacement = " get_lineage" ),
4442 meta = deprecation_meta(replacement = " get_lineage" ),
4543 title = " Get Model Parents" ,
4644 read_only_hint = True ,
@@ -51,11 +49,18 @@ async def get_model_parents(...):
5149 ...
5250```
5351
54- ` deprecated_description ` prepends a standard banner:
52+ ` deprecated_description ` ** replaces** the tool's description entirely — it does
53+ not prepend to the original prompt. It builds a short, blunt line:
5554
5655> ** DEPRECATED — use \` get_lineage\` instead.** This tool will be removed in a
5756> future release.
5857
58+ A shorter description makes a model less likely to pick the deprecated tool,
59+ which speeds the usage soak before removal. Pass ` removal_version="vX.Y" ` if a
60+ target removal version is already known, and ` arg_mapping="..." ` for a one-line
61+ note on how arguments map to the replacement — only needed when the replacement
62+ isn't a drop-in (see [ What to change] ( #what-to-change ) below).
63+
5964` deprecation_meta ` returns ` {"deprecated": True, "replacement": "<name>"} ` , which
6065surfaces as ` Tool._meta ` in the MCP protocol so clients can inspect it
6166programmatically.
@@ -65,6 +70,13 @@ programmatically.
6570- Apply ` deprecated_description(...) ` + ` deprecation_meta(replacement="<new>") ` at
6671 the ` @dbt_mcp_tool(...) ` call site in ** both** ` discovery/tools.py ` and
6772 ` discovery/tools_multiproject.py ` .
73+ - ** Optional — forward to the replacement.** If the replacement is a true
74+ drop-in (same inputs, same output shape), you may reimplement the deprecated
75+ tool's body as a thin call into the replacement to cut maintenance. Only do
76+ this when it doesn't change behavior — keep the deprecated tool's own schema
77+ and output contract exactly as they were. If the replacement isn't a drop-in
78+ (different required arguments, a reshaped output), don't force it; document
79+ the mapping instead with ` arg_mapping= ` and leave the implementation as-is.
6880
6981### What NOT to change
7082
0 commit comments