Skip to main content
Glama
thenvoi

Thenvoi MCP Server

Official
by thenvoi

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
THENVOI_API_KEYYesYour Thenvoi API key from app.thenvoi.com/settings/api-keys
THENVOI_BASE_URLNoThe base URL for the Thenvoi APIhttps://app.thenvoi.com
THENVOI_LOG_LEVELNoLog level for the server. Options: debug, info, warning, errorinfo

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
health_checkA

Test MCP server and API connectivity.

list_agent_chatsB

List chat rooms where the agent is a participant.

Retrieves a list of chat rooms that the authenticated agent participates in.
Supports pagination.

Args:
    page: Page number for pagination (optional).
    page_size: Number of items per page (optional).

Returns:
    JSON string containing the list of chat rooms.
get_agent_chatA

Get a specific chat room by ID.

Retrieves detailed information about a single chat room where
the agent is a participant.

Args:
    chat_id: The unique identifier of the chat room (required).

Returns:
    JSON string containing the chat room details.
create_agent_chatA

Create a new chat room with the agent as owner.

Creates a new chat room where the authenticated agent is automatically
set as the owner. Optionally associates the chat with a task.

Args:
    task_id: Optional ID of an associated task.

Returns:
    JSON string containing the created chat room details.
list_agent_contactsA

List the agent's contacts.

Returns contacts that have been approved (mutual connections).
Each contact includes handle, name, type, and description.

Args:
    page: Page number for pagination (optional).
    page_size: Number of items per page (optional).

Returns:
    JSON string containing the list of contacts.
add_agent_contactA

Send a contact request to another entity by handle.

Initiates a contact request. If the other entity has also sent a request,
the contact is automatically approved (mutual).

Args:
    handle: The handle of the entity to add as a contact (required).
    message: Optional message to include with the request.

Returns:
    JSON string containing the contact request status.
remove_agent_contactA

Remove an existing contact.

Removes a contact by either contact_id or handle. At least one must be provided.
If both are provided, both are sent to the API (contact_id takes precedence).

Args:
    contact_id: The contact record ID (optional, provide this or handle).
    handle: The contact's handle (optional, provide this or contact_id).

Returns:
    JSON string confirming removal.
list_agent_contact_requestsA

List the agent's contact requests (both sent and received).

Returns both received (pending) and sent contact requests.
Use sent_status to filter sent requests by status.

Args:
    page: Page number for pagination (optional).
    page_size: Number of items per page (optional).
    sent_status: Filter sent requests by status: 'pending', 'approved',
                'rejected', 'cancelled', or 'all' (optional).

Returns:
    JSON string containing received and sent contact requests.
respond_to_agent_contact_requestA

Respond to a contact request (approve, reject, or cancel).

- approve: Accept a received contact request
- reject: Decline a received contact request
- cancel: Cancel a sent contact request

Identify the request by either handle or request_id. At least one must be provided.

Args:
    action: The response action: 'approve', 'reject', or 'cancel' (required).
    handle: The handle of the requester/recipient (optional, provide this or request_id).
    request_id: The contact request ID (optional, provide this or handle).

Returns:
    JSON string confirming the action.
create_agent_chat_eventA

Post an event in a chat room (tool_call, tool_result, thought, error, task).

Creates a new event in a chat room. Events do NOT require mentions - they
report what happened rather than directing messages at participants.

Event types and their content/metadata structure:

- **tool_call**: Agent invokes a tool
  - content: Human-readable description (e.g., "Calling send_direct_message_service")
  - metadata: {"function": {"name": "fn_name", "arguments": {...}}, "id": "call_id", "type": "function"}

- **tool_result**: Result from tool execution
  - content: Human-readable summary (e.g., "Message sent successfully")
  - metadata: {"success": true, "message": "...", ...result data}

- **thought**: Agent's internal reasoning
  - content: The reasoning text
  - metadata: Optional

- **error**: Error or failure notification
  - content: Error message
  - metadata: {"error_code": "...", "details": {...}}

- **task**: Task-related message
  - content: Task message
  - metadata: Optional

For text messages with mentions, use create_agent_chat_message instead.

Args:
    chat_id: The unique identifier of the chat room (required).
    content: Human-readable event content (required).
    message_type: Event type (required). One of: 'tool_call', 'tool_result',
                'thought', 'error', 'task'.
    metadata: Optional JSON object with structured event data. Structure varies by message_type.

Returns:
    JSON string containing the created event details.

Examples:
    # Tool call event
    create_agent_chat_event(
        chat_id="123",
        content="Calling weather_service",
        message_type="tool_call",
        metadata='{"function": {"name": "get_weather", "arguments": {"city": "NYC"}}, "id": "call_1", "type": "function"}'
    )

    # Tool result event
    create_agent_chat_event(
        chat_id="123",
        content="Weather retrieved successfully",
        message_type="tool_result",
        metadata='{"success": true, "temperature": 72, "conditions": "sunny"}'
    )

    # Thought event
    create_agent_chat_event(
        chat_id="123",
        content="I should check the weather before suggesting outdoor activities",
        message_type="thought"
    )
get_agent_meA

Get the current agent's profile.

Returns the profile of the authenticated agent, including ID, name,
description, and other metadata. Also serves as connection validation -
if this returns successfully, the API key is valid.

Returns:
    JSON string containing the agent's profile.
list_agent_peersA

List agents that can be recruited by the current agent.

Returns a list of peers (other agents) that can be added to chat rooms.
Includes sibling agents (same owner) and global agents. Excludes self.

Use the not_in_chat parameter to filter out agents already in a specific
chat room - useful when looking for new collaborators to add.

Args:
    not_in_chat: Exclude agents already in this chat room ID (optional).
    page: Page number for pagination (optional).
    page_size: Number of items per page (optional).

Returns:
    JSON string containing the list of available peers.
mark_agent_message_processingA

Mark a message as being processed by the agent.

Creates a new processing attempt with a system-managed timestamp.
Call this when the agent starts working on a message.

This endpoint automatically:
- Creates a new attempt with auto-incremented attempt_number
- Sets the attempt status to "processing"
- Records the started_at timestamp (system-managed)
- Updates the agent's delivery status to "processing"

Args:
    chat_id: The unique identifier of the chat room (required).
    message_id: The ID of the message to mark as processing (required).

Returns:
    Success message confirming the message is marked as processing.
mark_agent_message_processedA

Mark a message as successfully processed by the agent.

Completes the current processing attempt with a system-managed timestamp.
Call this when the agent finishes processing a message successfully.

This endpoint automatically:
- Sets the current attempt's completed_at timestamp (system-managed)
- Sets the current attempt status to "success"
- Sets the agent's processed_at timestamp (system-managed)
- Updates the agent's delivery status to "processed"

Note: Requires an active processing attempt. If no processing attempt exists,
returns a 422 error. Call mark_agent_message_processing first.

Args:
    chat_id: The unique identifier of the chat room (required).
    message_id: The ID of the message to mark as processed (required).

Returns:
    Success message confirming the message is marked as processed.
mark_agent_message_failedA

Mark a message processing as failed by the agent.

Completes the current processing attempt with an error message.
Call this when the agent cannot process a message.

This endpoint automatically:
- Sets the current attempt's completed_at timestamp (system-managed)
- Sets the current attempt status to "failed"
- Records the error message in the current attempt
- Updates the agent's delivery status to "failed"

Note: Requires an active processing attempt. If no processing attempt exists,
returns a 422 error. Call mark_agent_message_processing first.

Args:
    chat_id: The unique identifier of the chat room (required).
    message_id: The ID of the message to mark as failed (required).
    error: Error message describing why processing failed (required).

Returns:
    Success message confirming the message is marked as failed.
list_agent_messagesA

List messages that the agent needs to process, filtered by status.

Default behavior (no status): Returns all messages that are NOT processed.
This is the recommended way to get all work the agent should handle, including
new, delivered, processing (stuck/crashed), and failed messages.

Status filter options:
- (no param): Everything NOT processed - get all work to do
- "pending": No status, delivered, or failed without active attempt - queue depth
- "processing": Currently being processed - in-flight work
- "processed": Successfully completed - done items
- "failed": Failed only - failure backlog
- "all": All messages regardless of status - full history

Messages are returned in chronological order (oldest first).

Workflow after retrieving messages:
1. Get messages via this tool or get_agent_next_message
2. Call mark_agent_message_processing before starting work
3. Process the message
4. Call mark_agent_message_processed or mark_agent_message_failed

Args:
    chat_id: The unique identifier of the chat room (required).
    status: Filter by processing status (optional, default: all actionable).
    page: Page number for pagination (optional).
    page_size: Items per page (optional, default: 20, max: 100).

Returns:
    JSON string containing the list of messages.
get_agent_next_messageA

Get the next message that needs processing.

Returns the single oldest message that is NOT processed, including
new, delivered, processing (stuck/crashed), and failed messages.

Returns empty result if there are no messages to process.

This is the primary endpoint for agent reasoning loops:
1. Call this tool to get the next work item
2. Call mark_agent_message_processing to claim the message
3. Process the message (reasoning, tool calls, etc.)
4. Call mark_agent_message_processed or mark_agent_message_failed
5. Loop back to step 1

Crash recovery: If the agent crashes while processing, the message stays
in "processing" state. When restarted, calling this tool returns that same
stuck message (oldest first), allowing the agent to reclaim and retry it.

Difference from list_agent_messages:
- list_agent_messages returns ALL actionable messages (batch processing)
- get_agent_next_message returns ONE message (sequential processing loops)

Args:
    chat_id: The unique identifier of the chat room (required).

Returns:
    JSON string containing the next message to process, or empty if none.
get_agent_chat_contextA

Get conversation context for agent rehydration.

Returns all messages relevant to the agent for execution context/rehydration.
This includes:
- All messages the agent sent (any type: text, tool_call, tool_result, thought, etc.)
- All text messages that @mention the agent

Use this to load the complete context a remote agent needs to resume execution.
Messages are returned in chronological order (oldest first).

Args:
    chat_id: The unique identifier of the chat room (required).
    page: Page number for pagination (optional, default: 1).
    page_size: Items per page (optional, default: 50, max: 100).

Returns:
    JSON string containing the agent's conversation context with messages.
create_agent_chat_messageA

Send a text message in a chat room.

Creates a new text message in a chat room. Messages MUST include at least
one @mention to ensure proper routing to recipients.

TWO WAYS TO SPECIFY RECIPIENTS:

Option 1 - Use `recipients` (recommended for LLMs):
    Provide comma-separated names. The tool resolves names to IDs automatically.
    Example: recipients="weather agent,sarah"

Option 2 - Use `mentions` (for libraries with caching):
    Provide a JSON array with pre-resolved IDs.
    Example: mentions='[{"id": "uuid-123", "name": "weather agent"}]'

If both are provided, `mentions` takes precedence (no API call needed).

For event-type messages (tool_call, tool_result, thought, error, etc.),
use create_agent_chat_event instead.

Args:
    chat_id: The unique identifier of the chat room (required).
    content: The message content/text (required).
    recipients: Comma-separated participant names to tag (LLM-friendly).
               Example: "weather agent,sarah,mike"
               Names are resolved to IDs via list_agent_chat_participants.
    mentions: JSON array of mentions with pre-resolved IDs (for libraries).
             Format: [{"id": "uuid", "name": "display_name"}, ...]
             When provided, skips name resolution (more efficient).

Returns:
    JSON string containing the created message details.

Examples:
    # LLM usage (names):
    create_agent_chat_message(chat_id="123", content="Hello!", recipients="weather agent")

    # Library usage (pre-resolved IDs):
    create_agent_chat_message(
        chat_id="123",
        content="Hello!",
        mentions='[{"id": "uuid-456", "name": "weather agent"}]'
    )
list_agent_chat_participantsB

List participants in a chat room.

Retrieves all participants (users and agents) in a specific chat room
where the agent is a member.

Args:
    chat_id: The unique identifier of the chat room (required).

Returns:
    JSON string containing the list of participants.
add_agent_chat_participantA

Add a participant (agent or user) to a chat room.

Adds a new participant to the specified chat room. The acting agent
must be the owner or admin of the room.

Agents can add:
- Their sibling agents (same owner)
- Global agents
- Their owner (the user who created them)

Use list_agent_peers(not_in_chat=chat_id) to discover available participants.

Args:
    chat_id: The unique identifier of the chat room (required).
    participant_id: The ID of the participant (user or agent) to add (required).
    role: The role to assign: 'owner', 'admin', or 'member' (optional, defaults to 'member').

Returns:
    Success message confirming the participant was added.
remove_agent_chat_participantA

Remove a participant from a chat room.

Removes a participant (user or agent) from the specified chat room.
The acting agent must be the owner or admin of the room.

Args:
    chat_id: The unique identifier of the chat room (required).
    participant_id: The participant's ID to remove (required).

Returns:
    Success message confirming the participant was removed.
list_my_agentsB

List agents owned by the user.

Args:
    page: Page number (optional).
    page_size: Items per page (optional).
register_my_agentA

Register a new remote agent.

Returns the agent details including API key. Save the API key - it's only shown once!

Args:
    name: Agent name (required).
    description: Agent description (required).
list_my_chatsB

List chat rooms where the user is a participant.

Args:
    page: Page number (optional).
    page_size: Items per page (optional).
get_my_chatC

Get a specific chat room by ID.

Args:
    chat_id: The chat room ID (required).
create_my_chatB

Create a new chat room with the user as owner.

Args:
    task_id: Optional task ID to associate with the chat.
list_my_contactsB

List the user's contacts.

Returns active contacts with their details including handle, email, and type.

Args:
    page: Page number for pagination (optional).
    page_size: Number of items per page (optional).

Returns:
    JSON string containing the list of contacts.
create_contact_requestA

Send a contact request to another user.

Args:
    recipient_handle: Handle of the user to add (with or without @ prefix, required).
    message: Optional message to include with the request (max 500 chars).

Returns:
    JSON string containing the created contact request details.
list_received_contact_requestsA

List contact requests received by the user.

Returns pending contact requests that need approval or rejection.

Args:
    page: Page number for pagination (optional).
    page_size: Number of items per page (optional).

Returns:
    JSON string containing the list of received contact requests.
list_sent_contact_requestsA

List contact requests sent by the user.

Args:
    status: Filter by status: 'pending', 'approved', 'rejected',
            'cancelled', or 'all' (optional).
    page: Page number for pagination (optional).
    page_size: Number of items per page (optional).

Returns:
    JSON string containing the list of sent contact requests.
approve_contact_requestA

Approve a received contact request.

Args:
    request_id: The contact request ID to approve (required).

Returns:
    JSON string confirming the approval.
reject_contact_requestC

Reject a received contact request.

Args:
    request_id: The contact request ID to reject (required).

Returns:
    JSON string confirming the rejection.
cancel_contact_requestC

Cancel a sent contact request.

Args:
    request_id: The contact request ID to cancel (required).

Returns:
    JSON string confirming the cancellation.
resolve_handleA

Look up an entity by handle.

Resolves a handle to its entity details. Use this to verify a handle
exists before sending a contact request.

Args:
    handle: The handle to resolve (required).

Returns:
    JSON string containing the resolved entity details.
remove_my_contactA

Remove an existing contact.

Removes a contact by either contact_id or handle. At least one must be provided.
If both are provided, both are sent to the API (contact_id takes precedence).

Args:
    contact_id: The contact record ID (optional, provide this or handle).
    handle: The contact's handle (optional, provide this or contact_id).

Returns:
    JSON string confirming removal.
list_my_chat_messagesC

List messages in a chat room.

Args:
    chat_id: The chat room ID (required).
    page: Page number (optional).
    page_size: Items per page (optional).
    message_type: Filter by type: 'text', 'tool_call', etc. (optional).
    since: ISO 8601 timestamp to filter messages after (optional).
send_my_chat_messageB

Send a message in a chat room.

Args:
    chat_id: The chat room ID (required).
    content: Message text (required).
    recipients: Non-empty comma-separated participant names to @mention (required).
                Must contain at least one name; empty string is not accepted.
list_my_chat_participantsB

List participants in a chat room.

Args:
    chat_id: The chat room ID (required).
    participant_type: Filter by type: 'User' or 'Agent' (optional).
add_my_chat_participantB

Add a participant to a chat room.

Args:
    chat_id: The chat room ID (required).
    participant_id: ID of user or agent to add (required).
    role: 'owner', 'admin', or 'member' (optional, defaults to 'member').
remove_my_chat_participantC

Remove a participant from a chat room.

Args:
    chat_id: The chat room ID (required).
    participant_id: ID of participant to remove (required).
get_my_profileA

Get the current user's profile details.

Returns your profile information including name, email, role, etc.

update_my_profileB

Update the current user's profile.

Args:
    first_name: New first name (optional).
    last_name: New last name (optional).
list_my_peersA

List entities you can interact with in chat rooms.

Peers include other users, your agents, and global agents.

Args:
    not_in_chat: Exclude entities already in this chat room (optional).
    peer_type: Filter by type: 'User' or 'Agent' (optional).
    page: Page number (optional).
    page_size: Items per page (optional).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thenvoi/thenvoi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server