Connecting tools
Stand up an MCP tool server, secure it, declare it in the manifest, and design tools the agent calls correctly.
1. Build an MCP server
pip install fastmcp"""CRM tool server example."""
from fastmcp import FastMCP
mcp = FastMCP("crm")
@mcp.tool
def get_account_status(party_id: str) -> dict:
"""Fetch the current account status for a customer.
Args:
party_id: The customer's PARTYID exactly as provided by
authentication — do not transform it.
Returns:
{"status": "ACTIVE" | "SUSPENDED" | "CLOSED",
"since": "YYYY-MM-DD",
"reason": str | None}
"""
record = lookup_account(party_id)
return {
"status": record.status,
"since": record.status_since.isoformat(),
"reason": record.status_reason,
}
if __name__ == "__main__":
mcp.run(transport="streamable-http", host="0.0.0.0", port=8001)2. Declare it in the manifest
Field
Type
Required
Default
Meaning
3. Designing tools the agent calls well
4. The other half: tool use in content
5. Verify the wiring
Checklist
Last updated
Was this helpful?

