apps/e2e/demo-e2e-codecall/src/apps/crm. It demonstrates how to group many CRUD tools behind the CodeCall plugin, feed them with an in-memory data store, and expose them through a single CodeCall entry point.
Source:
apps/e2e/demo-e2e-codecall/src/apps/crm. The apps/e2e/demo-e2e-codecall/src/apps/crm/data/crm.store.ts module seeds sample users and activities so the tools return realistic data without extra services.Architecture overview
- CodeCall plugin –
CodeCallPlugin.init({ topK: 10 })runs incodecall_onlymode so models discover tools via search rather than the global tool list. - Eight dedicated tools – Separate tool classes handle user CRUD plus activity logging and stats.
- Typed data store –
crmStoreexposes helpers for listing users, logging activities, and aggregating stats without external services. - Zod validation – Every tool validates inputs (email, enums, limits) before touching the store and returns structured responses.
App and plugin wiring
Tool catalog
Each tool extends
ToolContext, so the CodeCall plan receives consistent logging, auth info, and error handling.
CrmStore helpers
The in-memory store keeps sample data and exposes ergonomic helpers. Tools resolve it directly instead of re-implementing storage logic.Log activities through CodeCall
Theactivities:log tool validates the user before writing an entry and automatically updates lastLoginAt for login events—perfect for showcasing multi-step plans.
Run it locally
1
Install workspace dependencies
2
Start the demo server
http://localhost:3013). Keep this terminal open.3
Open the MCP Inspector
Run
npx @modelcontextprotocol/inspector, paste the server URL from the previous step, and click Connect.4
Exercise CodeCall
Call
codecall.search, codecall.describe, and codecall.execute from the Inspector to watch the CRM tools run inside the sandbox.Next Steps
CodeCall Plugin Docs
Full CodeCall plugin documentation
Building Tool UI
Build consent and status screens
Create a Plugin
Build your own plugins
Agent Orchestration
Create autonomous agents