[PR #8] [MERGED] refactor: migrate from deprecated server.tool to registerTool API #10

Closed
opened 2026-02-27 15:56:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rersozlu/food402/pull/8
Author: @rersozlu
Created: 2/2/2026
Status: Merged
Merged: 2/2/2026
Merged by: @rersozlu

Base: masterHead: feat/migrate-to-registertool-api


📝 Commits (3)

  • 7794a1c refactor: migrate from deprecated server.tool to registerTool API
  • 743bf75 feat: add select_payment prompt for payment card selection
  • 82c6733 feat: add closed restaurant guidance to search_restaurants tool

📊 Changes

3 files changed (+864 additions, -204 deletions)

View changed files

UPGRADE_PLAN.md (+352 -0)
📝 remote/src/server.ts (+269 -112)
📝 src/index.ts (+243 -92)

📄 Description

Summary

  • Migrated all deprecated server.tool() calls to server.registerTool() in both local and remote MCP servers
  • Migrated server.prompt() to server.registerPrompt() in local server
  • Added title property to all tools and prompts for improved discoverability
  • Added closed restaurant guidance to search_restaurants tool description to ensure agents don't recommend closed restaurants

Changes

File Tools Prompts
src/index.ts 21 migrated 1 migrated
remote/src/server.ts 21 migrated title added

Closed Restaurant Handling

Updated search_restaurants tool description in both servers to instruct AI agents to:

  • Check the isClosed field before recommending restaurants
  • Never suggest closed restaurants to users
  • Inform users when a restaurant is closed and suggest open alternatives

Test plan

  • TypeScript compilation passes for both servers
  • Wrangler dry-run succeeds for remote server
  • All 8 OAuth provider tests pass
  • No deprecated patterns remain in source

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rersozlu/food402/pull/8 **Author:** [@rersozlu](https://github.com/rersozlu) **Created:** 2/2/2026 **Status:** ✅ Merged **Merged:** 2/2/2026 **Merged by:** [@rersozlu](https://github.com/rersozlu) **Base:** `master` ← **Head:** `feat/migrate-to-registertool-api` --- ### 📝 Commits (3) - [`7794a1c`](https://github.com/rersozlu/food402/commit/7794a1c40f969dbef4a908596a087fb4f3910a6f) refactor: migrate from deprecated server.tool to registerTool API - [`743bf75`](https://github.com/rersozlu/food402/commit/743bf75b1222de78e164d422ae99632ba5b9281a) feat: add select_payment prompt for payment card selection - [`82c6733`](https://github.com/rersozlu/food402/commit/82c6733e048c72b45f2fb58c14a8e13c18ad2c5c) feat: add closed restaurant guidance to search_restaurants tool ### 📊 Changes **3 files changed** (+864 additions, -204 deletions) <details> <summary>View changed files</summary> ➕ `UPGRADE_PLAN.md` (+352 -0) 📝 `remote/src/server.ts` (+269 -112) 📝 `src/index.ts` (+243 -92) </details> ### 📄 Description ## Summary - Migrated all deprecated `server.tool()` calls to `server.registerTool()` in both local and remote MCP servers - Migrated `server.prompt()` to `server.registerPrompt()` in local server - Added `title` property to all tools and prompts for improved discoverability - Added closed restaurant guidance to `search_restaurants` tool description to ensure agents don't recommend closed restaurants ## Changes | File | Tools | Prompts | |------|-------|---------| | `src/index.ts` | 21 migrated | 1 migrated | | `remote/src/server.ts` | 21 migrated | title added | ### Closed Restaurant Handling Updated `search_restaurants` tool description in both servers to instruct AI agents to: - Check the `isClosed` field before recommending restaurants - Never suggest closed restaurants to users - Inform users when a restaurant is closed and suggest open alternatives ## Test plan - [x] TypeScript compilation passes for both servers - [x] Wrangler dry-run succeeds for remote server - [x] All 8 OAuth provider tests pass - [x] No deprecated patterns remain in source 🤖 Generated with [Claude Code](https://claude.ai/code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem closed this issue 2026-02-27 15:56:48 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/food402#10
No description provided.