The whoiam tool retrieves information about the currently authenticated user and their connected Madgicx team.
Overview
- Category Identity
- Parameters None required
- Authentication OAuth token
Use Cases
Verify Connection
Confirm your MCP client is properly connected to Madgicx
Check Permissions
Review which OAuth scopes have been granted
Facebook Token Status
Verify your Facebook integration is active
Response
| Parameter | Type | Description |
|---|---|---|
user_id |
string |
Your unique Madgicx user identifier |
team_id |
string |
The connected Madgicx team identifier |
permissions |
string[] |
Array of granted OAuth scopes |
facebook_token |
object |
Facebook token status information |
Facebook Token Object
| Parameter | Type | Description |
|---|---|---|
status |
"active" | "expiring" | "expired" |
Current token status |
expires_at |
string |
ISO 8601 timestamp of token expiration |
Example Response
{
"user_id": "user_123abc",
"team_id": "team_456def",
"permissions": ["mcp:read", "mcp:write"],
"facebook_token": {
"status": "active",
"expires_at": "2024-12-31T23:59:59Z"
}
}
Usage Examples
Natural Language
Ask your AI assistant naturally:
What Madgicx team am I connected to?
Show me my user information
Is my Facebook connection active?
Direct Query
The AI will call the tool with:
{
"tool": "whoiam",
"arguments": {}
}
Error Handling
Unauthorized (401)
{
"error": "unauthorized",
"message": "Access token is invalid or expired"
}
Cause: Your OAuth token has expired or is invalid.
Solution: Reconnect the MCP client to obtain a new token.
Forbidden (403)
{
"error": "forbidden",
"message": "Missing required scope: mcp:read"
}
Cause: Your authorization doesn't include the required mcp:read scope.
Solution: Disconnect and reconnect, ensuring you approve all requested permissions.
Related
- Authentication OAuth flow details