Skip to content

Add example of registering MCP Tool in a Server#164

Merged
pushpak1300 merged 4 commits intolaravel:mainfrom
mohammadRezaei1380:skill.md_Tools
Feb 24, 2026
Merged

Add example of registering MCP Tool in a Server#164
pushpak1300 merged 4 commits intolaravel:mainfrom
mohammadRezaei1380:skill.md_Tools

Conversation

@mohammadRezaei1380
Copy link
Copy Markdown
Contributor

This PR improves the MCP Development skill documentation by adding a minimal, clear example of how to register a previously created MCP Tool in a Server.

Previously, the documentation showed how to create MCP tools using artisan commands and provided an example of a Tool class, but it did not show how to expose that Tool via a Server. This caused a gap in the developer flow.

Changes included:

  • Added a new section "Registering the Tool in a Server"
  • Included a @boostsnippet showing an AppServer class with the tool registered in the $tools property
  • Kept the example minimal, focusing only on tools to ensure clarity and quick understanding
  • No breaking changes, no behavioral changes

This small addition improves clarity and helps developers quickly understand the full MCP Tool workflow, increasing the value of the skill documentation without affecting existing snippets.

@mohammadRezaei1380
Copy link
Copy Markdown
Contributor Author

Note for maintainers:

The CI failure is due to an unused import in src/Facades/Mcp.php (use Illuminate\Routing\Route;)
and is unrelated to the changes in this PR.

This PR only adds a documentation snippet showing how to register an MCP Tool in a Server.
No source code was modified, so the added snippet is merge-safe.

@pushpak1300 pushpak1300 merged commit 28860a1 into laravel:main Feb 24, 2026
22 checks passed
@pushpak1300
Copy link
Copy Markdown
Member

Thanks.

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.

2 participants