Skip to content

Conversation

@goneri
Copy link

@goneri goneri commented Oct 1, 2025

Expose the deprecated attribute and default to false.

Summary by CodeRabbit

  • New Features
    • Tool definitions now include a deprecated flag (defaults to false) derived from operation metadata.
    • Deprecation status is propagated to generated tools so clients and UIs can detect and display deprecated tools.
    • Schema extended with a deprecated field; behavior unchanged for tools not marked deprecated.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 1, 2025

Walkthrough

Reads operation.deprecated (defaults to false) during tool extraction and adds a deprecated: boolean field to emitted McpToolDefinition objects and its type declaration.

Changes

Cohort / File(s) Summary
Parser: tool extraction
src/parser/extract-tools.ts
Read `operation.deprecated
Types: public interface
src/types/index.ts
Add deprecated: boolean to the exported McpToolDefinition interface (documents OpenAPI deprecated attribute).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Caller
  participant Parser
  participant ToolDef

  Caller->>Parser: supply OpenAPI operation
  Parser->>Parser: inspect operation metadata
  Note right of Parser #DDEBF7: deprecated = operation.deprecated || false
  Parser->>ToolDef: construct McpToolDefinition { ..., deprecated }
  ToolDef-->>Caller: return tool definition (includes deprecated)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitched my whiskers and checked the map,
A little flag for tools that nap.
"Deprecated" sewn on each small sign,
Gentle guidance down the line.
🥕🐇

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely conveys that the tool definitions now expose the deprecated attribute, accurately summarizing the primary change introduced by this pull request.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c8f4758 and 1d9a8d8.

📒 Files selected for processing (2)
  • src/parser/extract-tools.ts (2 hunks)
  • src/types/index.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/parser/extract-tools.ts
  • src/types/index.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ee9fc3 and 3985079.

📒 Files selected for processing (1)
  • src/parser/extract-tools.ts (2 hunks)
🔇 Additional comments (1)
src/parser/extract-tools.ts (1)

93-94: LGTM! Clean implementation of deprecated flag extraction.

The logic correctly reads operation.deprecated and defaults to false when undefined or null. The placement is appropriate, computing the value just before tool object creation.

@goneri goneri force-pushed the goneri/tool-expose-the-deprecated-attribute_23942 branch from 3985079 to c8f4758 Compare October 3, 2025 17:15
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3985079 and c8f4758.

📒 Files selected for processing (2)
  • src/parser/extract-tools.ts (2 hunks)
  • src/types/index.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/parser/extract-tools.ts

Expose the `deprecated` attribute and default to `false`.
@goneri goneri force-pushed the goneri/tool-expose-the-deprecated-attribute_23942 branch from c8f4758 to 1d9a8d8 Compare October 3, 2025 17:26
goneri added a commit to goneri/poc-aap-mcp that referenced this pull request Oct 8, 2025
goneri added a commit to goneri/aap-mcp-server that referenced this pull request Oct 30, 2025
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.

1 participant