Skip to content

v0.1.0-rc.4 - Phoenix Route Introspection

Choose a tag to compare

@GustavoZiaugra GustavoZiaugra released this 25 Mar 15:40
· 35 commits to main since this release
7480abe

What's New

Phoenix Route Introspection (Issue #14) - Phase 3 Complete! 🎉

Automatically expose your Phoenix routes as callable MCP tools:

Features

  • expose_routes/1 macro to auto-generate MCP tools from Phoenix router
  • Support for all HTTP methods: GET, POST, PUT, PATCH, DELETE
  • Smart tool naming with automatic singularization:
    • /usersget_users, post_users
    • /users/:idget_user, put_user, delete_user
  • Route filtering with :only, :except, :methods, :namespace options
  • Direct controller action execution via Plug.Test.conn

Usage

defmodule MyApp.MCP do
  use Ectomancer
  
  # Expose all routes
  expose_routes MyAppWeb.Router
  
  # With filtering
  expose_routes MyAppWeb.Router,
    only: ["/api/users"],
    namespace: :api
end

Stats

  • 179 new tests
  • Full documentation
  • Credo compliant

Issues Closed