This prompt is designed for API platform teams and developer-tooling engineers who need to communicate tool deprecation to an AI model in a structured, machine-readable way. The core job is not to write a human-facing changelog, but to generate a model-facing deprecation schema that includes a sunset date, a replacement tool mapping, and migration guidance. The ideal user is an engineering lead or platform architect responsible for a growing catalog of tools where old endpoints, parameters, or entire functions must be retired without breaking existing AI workflows that depend on them.
Prompt
Tool Deprecation Notice Generation Prompt

When to Use This Prompt
Defines the job-to-be-done, the ideal user, required context, and the boundaries where this prompt should not be applied.
Use this prompt when you are actively retiring or replacing a tool in a production AI system and you need the model to stop selecting the deprecated tool, redirect to a successor, or explain the deprecation to the end user. It requires you to provide the deprecated tool's name, the reason for deprecation, the sunset date, and the replacement tool definition if one exists. The prompt is most effective when integrated into a tool registration pipeline where deprecation notices are injected into the system prompt or tool catalog alongside active tools. Do not use this prompt for minor parameter changes that don't break compatibility, for tools that are simply being renamed without behavioral changes, or for human-facing API changelogs where the audience is a developer reading documentation rather than a model making a tool selection decision.
Before using this prompt, ensure you have a clear deprecation policy in place. The generated notice will include a structured schema, but the effectiveness depends on your model's ability to respect deprecation signals. In high-stakes environments—such as financial transactions, healthcare operations, or safety-critical systems—you must pair this prompt with a pre-execution guardrail that validates the model did not call a deprecated tool. The prompt alone is a signal, not an enforcement mechanism. If your system cannot tolerate any deprecated tool calls, implement a hard block at the API gateway or tool execution layer rather than relying solely on model adherence to the notice.
Use Case Fit
Where this prompt works, where it fails, and the operational prerequisites for generating model-facing deprecation notices that models actually obey.
Good Fit: Structured API Lifecycle Management
Use when: your team maintains a formal tool catalog with versioned schemas, sunset dates, and a documented replacement path. The prompt produces a machine-readable deprecation notice that can be injected into system prompts or tool descriptions. Guardrail: validate that every deprecated tool has a non-null replacement mapping or an explicit null with a migration note before publishing.
Bad Fit: Ad-Hoc or Undocumented Tool Removal
Avoid when: the deprecated tool has no documented replacement, no migration path, and no sunset timeline. The model cannot fabricate migration guidance from missing information. Guardrail: require a completed deprecation intake form with replacement tool ID, migration steps, and sunset date before running this prompt. If any field is missing, block generation and escalate to the API team.
Required Inputs: Deprecation Source of Truth
Risk: generating a deprecation notice from incomplete or verbal handoff notes produces misleading migration guidance that models will trust. Guardrail: the prompt requires a structured input object containing the deprecated tool name, replacement tool name or explicit null, sunset date in ISO 8601, migration instructions, and a breaking-change severity flag. Reject generation if any required field is absent.
Operational Risk: Model Ignores Deprecation Signal
Risk: even a well-formed deprecation notice may be ignored if the model's system prompt does not enforce tool selection policy or if the deprecated tool remains in the available tool list. Guardrail: pair this prompt's output with a tool selection policy prompt that instructs the model to reject deprecated tools and prefer replacements. Log every instance where a deprecated tool is selected despite an active notice for audit.
Operational Risk: Premature Deprecation Before Replacement Readiness
Risk: publishing a deprecation notice before the replacement tool is fully deployed and tested causes models to select a non-functional replacement or fall back to hallucinated tools. Guardrail: gate deprecation notice publication on a deployment checklist that confirms the replacement tool is live, tested with the same model, and passing eval for argument compatibility.
Variant: Silent Deprecation with Grace Period
Use when: you want the model to prefer the replacement but still accept the deprecated tool during a transition window. Guardrail: generate a soft-deprecation variant that includes a preferred_until date, a deprecated_after date, and a deprecation_level of warning instead of error. Monitor selection ratios during the grace period and escalate if deprecated tool usage does not decline.
Copy-Ready Prompt Template
A reusable prompt template for generating model-facing deprecation notices when tools are retired or replaced.
This prompt template is designed to produce a structured deprecation notice that a model can interpret and act upon. It takes the deprecated tool's name, its replacement, a sunset timeline, and a migration guide as inputs. The output is a JSON schema that can be injected into the system prompt or tool catalog, allowing the model to understand that a tool is no longer preferred and to route requests to the replacement. The template uses square-bracket placeholders for all required inputs, making it easy to integrate into an automated CI/CD pipeline for your API's tool definitions.
codeYou are an AI platform engineer generating a machine-readable deprecation notice for a tool in a model's function catalog. Your output will be parsed by a downstream system and injected into the model's available tools list. Generate a JSON object that follows this exact [OUTPUT_SCHEMA]. The notice must clearly signal deprecation, provide a migration path, and include a sunset date. ## Inputs - **Deprecated Tool Name:** [DEPRECATED_TOOL_NAME] - **Replacement Tool Name:** [REPLACEMENT_TOOL_NAME] (use null if no direct replacement) - **Sunset Date (ISO 8601):** [SUNSET_DATE] - **Deprecation Reason:** [DEPRECATION_REASON] - **Migration Guide (plain text):** [MIGRATION_GUIDE] - **Risk Level:** [RISK_LEVEL] (must be one of: low, medium, high, critical) ## Constraints - [CONSTRAINTS] ## Output Schema ```json { "deprecation_notice": { "deprecated_tool": "string", "replacement_tool": "string | null", "sunset_date": "string (ISO 8601)", "reason": "string", "migration_guide": "string", "risk_level": "low | medium | high | critical", "model_instruction": "A concise, imperative sentence telling the model what to do when this tool is requested. E.g., 'Do not call this tool. Route all requests to [REPLACEMENT_TOOL_NAME] instead.'" } }
Examples
[EXAMPLES]
To adapt this template, replace each bracketed placeholder with concrete values from your API's change management system. The [CONSTRAINTS] placeholder is critical for high-risk deprecations; use it to inject rules like 'If the sunset date is within 7 days, the model_instruction must begin with URGENT.' The [EXAMPLES] placeholder should contain one or two few-shot examples of correct deprecation notices for your specific tool ecosystem. After generating the notice, always validate the output against the [OUTPUT_SCHEMA] using a JSON Schema validator before injecting it into any production model context. For critical-risk deprecations, require a human review step in your deployment pipeline to confirm the migration guide is accurate and the replacement tool is fully operational.
Prompt Variables
Required inputs for the Tool Deprecation Notice Generation Prompt. Each variable must be supplied before the prompt is executed to ensure the model produces a valid, machine-readable deprecation schema.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[TOOL_NAME] | The exact function name as registered in the model's tool catalog. | search_inventory | Must match the tool name string exactly. Case-sensitive. Validate against the live tool registry before prompt execution. |
[TOOL_VERSION] | The current version string of the tool being deprecated. | v2.1.3 | Must conform to the organization's versioning convention. Null allowed if the tool was never versioned. |
[SUNSET_DATE] | The ISO 8601 date after which the tool will return errors or be removed. | 2026-03-15 | Must be a future date. Parse check for ISO 8601 format. Reject if date is in the past. |
[REPLACEMENT_TOOL_NAME] | The canonical name of the replacement tool, if one exists. | search_catalog_v3 | Must be a valid tool name in the current catalog. Set to null if no direct replacement exists. Validate against registry. |
[MIGRATION_NOTES] | A plain-text string describing breaking changes, new authentication requirements, or parameter mapping. | The 'warehouse_id' param is now required. OAuth2 scope changed to 'inventory:read'. | Must be non-empty. Should be reviewed by the API team for accuracy. No markdown or HTML allowed. |
[DEPRECATION_REASON] | A short enum value categorizing why the tool is being deprecated. | SECURITY_UPGRADE | Must be one of the allowed enum values: SECURITY_UPGRADE, BUGGY_BEHAVIOR, CONSOLIDATION, EOL_VENDOR, PERFORMANCE. Reject unknown values. |
[CONTACT_EMAIL] | An internal contact for questions about the deprecation. | Must pass a basic email regex check. Used for audit trails, not exposed to end users. |
Implementation Harness Notes
How to wire the deprecation notice prompt into a CI pipeline, API gateway, or tool registry with validation, retries, and human review gates.
This prompt is designed to run as a batch job or CI step, not as a real-time user-facing call. The typical integration point is a tool registry update pipeline: when an API team marks a tool as deprecated in their source of truth (OpenAPI spec, internal catalog, protobuf definitions), a webhook or scheduled job triggers this prompt to generate the model-facing deprecation notice. The output is a structured JSON payload that gets injected into the tool schema's deprecation field or published to a tool-change feed that AI gateways consume. Do not wire this prompt directly into a chat interface or agent loop—it produces infrastructure metadata, not conversational responses.
Validation and retry logic is critical because a malformed deprecation notice silently breaks model tool selection. After the prompt returns, validate the output against a strict JSON Schema that checks: deprecated is a boolean set to true, deprecation_date is an ISO 8601 date in the future, sunset_date is present and after deprecation_date, replacement_tool is either null or a valid tool identifier from your registry, and migration_notes is a non-empty string. If validation fails, retry once with the validation errors appended to the [CONSTRAINTS] block. If the second attempt also fails, route to a human reviewer via a ticket or Slack notification—never auto-merge a broken deprecation notice into production tool schemas. Log every generation attempt with the model version, prompt hash, input tool name, and validation result for auditability.
Model choice matters for consistency. Use a model with strong JSON Schema adherence (GPT-4o, Claude 3.5 Sonnet, or equivalent) and set response_format to json_schema with the output schema provided inline. Avoid smaller or older models that may hallucinate dates, invent replacement tools, or omit required fields. If your tool registry already has a canonical deprecation policy (e.g., '90-day notice before sunset'), inject that policy into the [CONSTRAINTS] placeholder rather than relying on the model to infer it. For high-volume tool catalogs, consider batching multiple deprecation requests into a single prompt call with an array input to reduce latency and cost, but validate each array element independently.
Human review is required before the generated notice goes live if the tool being deprecated has production traffic, handles write operations, or is used by external customers. The review gate should present the generated deprecation notice alongside the tool's current usage metrics and a diff of the proposed schema change. The reviewer confirms three things: the sunset date aligns with the API team's communicated timeline, the replacement tool mapping is correct and the replacement tool actually exists, and the migration notes are accurate enough for a model to guide users to the right alternative. After approval, the notice is merged into the tool schema and the change is broadcast to all AI gateways that consume the tool catalog. Rejections should loop back to the API team with the reviewer's notes, not to the prompt—the prompt generates the draft, it doesn't decide policy.
Expected Output Contract
Fields, format, and validation rules for the deprecation notice object the model must generate. Use this contract to parse, validate, and act on the model output before publishing the notice to downstream systems.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
deprecated_tool_name | string | Must match an existing tool name in the provided [TOOL_CATALOG]. Reject if no match found. | |
deprecation_effective_date | ISO 8601 date string (YYYY-MM-DD) | Must be a valid date. Must be today or in the future. Reject if date is in the past. | |
sunset_date | ISO 8601 date string (YYYY-MM-DD) or null | If provided, must be after deprecation_effective_date. Allow null if the tool has no planned removal date. | |
replacement_tool_name | string or null | If not null, must match an existing tool name in [TOOL_CATALOG] and must not be the same as deprecated_tool_name. Reject on self-replacement. | |
migration_instructions | string | Must be non-empty. Must contain at least one actionable step referencing the replacement tool or a manual process. Reject if generic placeholder text is detected. | |
breaking_changes | array of strings | Each string must describe a specific parameter, behavior, or output change. Empty array is allowed if no breaking changes exist. Reject if items are vague single words. | |
deprecation_reason | enum string | Must be one of: 'security', 'performance', 'redundant', 'deprecated_api', 'breaking_change', 'other'. Reject on unrecognized values. | |
affected_environments | array of strings | If present, each string must match a known environment label from [ENVIRONMENT_LIST]. Reject on unknown environment values. Default to all environments if absent. |
Common Failure Modes
Deprecation notices are a contract between your API and the model. When they fail, the model ignores the sunset date, calls a dead tool, or hallucinates a migration path. These are the most common failure modes and how to prevent them.
Model Ignores the Deprecation Notice Entirely
What to watch: The model calls the deprecated tool as if the notice doesn't exist, especially when the replacement tool name is unfamiliar or the deprecation notice is buried in a long description field. Models often prioritize function name similarity over deprecation metadata. Guardrail: Place the deprecation notice at the top of the tool description in a dedicated deprecation field, not buried in prose. Use explicit language: 'This tool is deprecated. Do not call it. Use [REPLACEMENT_TOOL] instead.' Test with eval cases that include the deprecated tool name in the user request to verify the model selects the replacement.
Model Hallucinates a Migration Path or Replacement Arguments
What to watch: When the deprecation notice mentions a replacement tool but doesn't provide a complete argument mapping, the model invents parameter translations, often dropping required fields or fabricating enum values. This is especially common when the old and new tools have different parameter shapes. Guardrail: Include an explicit migration object in the deprecation schema with a field-by-field argument mapping. For each old parameter, specify the new parameter name, any transformation logic, and whether a default value should be used. Validate generated calls against the replacement tool's schema before execution.
Sunset Date Is Ignored or Misinterpreted
What to watch: The model calls the deprecated tool after the sunset date has passed, or treats the sunset date as a suggestion rather than a hard cutoff. Models lack real-time clock awareness and may not reason about dates correctly, especially when the sunset date is far in the future or ambiguously formatted. Guardrail: Use ISO 8601 date format (YYYY-MM-DD) in a dedicated sunset_date field. Add a runtime guard in your application layer that rejects calls to deprecated tools after the sunset date and returns a structured error the model can use for recovery. Never rely on the model alone to enforce temporal constraints.
Deprecation Notice Causes Over-Refusal on Related but Valid Tools
What to watch: A strongly worded deprecation notice for one tool causes the model to avoid an entire category of related tools, even when those tools are still active and appropriate. This is common when tools share a naming prefix or functional domain. Guardrail: Scope the deprecation notice to the specific tool name only. Add clarifying language: 'Other tools in this category remain active.' Include positive examples in the prompt showing correct selection of non-deprecated sibling tools. Test with eval cases that exercise the boundary between deprecated and active tools in the same domain.
Replacement Tool Is Selected but Called with Stale Argument Patterns
What to watch: The model correctly selects the replacement tool but constructs arguments using the old tool's parameter names, types, or enum values. This produces validation errors that cascade into retry loops or silent failures. Guardrail: Provide a complete parameter_mapping in the deprecation notice that explicitly maps every old parameter to its new equivalent. Include type coercion rules where types differ. Add pre-execution validation that checks argument schemas against the replacement tool's current definition, not the deprecated tool's schema.
Deprecation Notice Conflicts with Few-Shot Examples or Cached Context
What to watch: Existing few-shot examples, conversation history, or cached system prompts still reference the deprecated tool, causing the model to follow the old pattern despite the deprecation notice. Stale examples are a stronger signal to the model than a new deprecation field. Guardrail: Audit and update all few-shot examples, system prompts, and conversation templates when a tool is deprecated. If examples cannot be updated immediately, add a runtime filter that strips deprecated tool references from context before they reach the model. Version your prompt templates alongside your tool schemas.
Evaluation Rubric
Use this rubric to evaluate the quality of a generated tool deprecation notice before exposing it to a model in production. Each criterion targets a specific failure mode in deprecation signaling.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Replacement Tool Mapping | The [REPLACEMENT_TOOL_NAME] is a valid, non-deprecated tool in the current catalog | The replacement field is empty, references a non-existent tool, or points to another deprecated tool | Validate [REPLACEMENT_TOOL_NAME] against the active tool registry; reject null or circular references |
Sunset Date Format | The [SUNSET_DATE] is in ISO 8601 format (YYYY-MM-DD) and is a future date | The date is in a non-standard format, is a past date, or is missing | Parse [SUNSET_DATE] with a strict date parser; confirm the value is greater than the current system date |
Migration Guidance Completeness | The [MIGRATION_INSTRUCTIONS] field contains at least one actionable step for parameter mapping | The field is empty, contains only a generic message like 'use the new tool', or omits required parameter changes | Check string length > 50 characters and verify the presence of at least one parameter name from the new tool's schema |
Deprecation Severity Level | The [DEPRECATION_LEVEL] is set to 'warning' or 'blocking' and matches the intended policy | The level is an unrecognized string, null, or contradicts the sunset timeline | Validate [DEPRECATION_LEVEL] against the allowed enum ['warning', 'blocking']; fail on any other value |
Parameter Mapping Accuracy | All required parameters in the deprecated tool have a corresponding mapping in the [PARAMETER_MAP] object | A required parameter from the deprecated tool schema is missing from the map, or maps to a non-existent new parameter | Diff the keys of the deprecated tool's required parameters against the keys of [PARAMETER_MAP]; flag any missing entries |
Model Adherence Signal | When the notice is included in the system prompt, the model calls the replacement tool for a relevant request | The model continues to call the deprecated tool, or returns an error without attempting the replacement | Run 10 test requests that match the deprecated tool's intent; assert that 0 calls are made to the deprecated tool name |
User-Facing Message Safety | The [USER_MESSAGE] does not expose internal tool names, raw error codes, or migration timelines | The message contains internal identifiers like 'tool_v2_internal' or raw JSON snippets | Scan [USER_MESSAGE] for the presence of the deprecated tool name, 'deprecated', or any internal ID pattern; fail if found |
Backward Compatibility Note | The notice explicitly states whether the deprecated tool will continue to function until the sunset date | No statement about behavior between now and the sunset date is present, leaving the model to guess | Search for a boolean or explicit phrase indicating continued operation or immediate blocking in the [DEPRECATION_NOTICE] text |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Use the base prompt with a single deprecated tool and its replacement. Skip strict schema validation. Focus on whether the model generates a deprecation notice that includes a sunset date and migration path.
codeGenerate a deprecation notice for [TOOL_NAME]. It is replaced by [REPLACEMENT_TOOL]. Sunset date: [SUNSET_DATE].
Watch for
- Model inventing replacement tools that don't exist
- Missing sunset dates or vague migration language
- No distinction between
deprecatedandremovedstatus

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us