Skip to main content
Glama
ambivo-corp

Ambivo MCP Server

Official
by ambivo-corp

set_auth_token

Authenticate API requests by configuring the JWT Bearer token required to access Ambivo API endpoints for natural language data queries.

Instructions

Set the authentication token for API requests. This must be called before using other tools to authenticate with the Ambivo API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesJWT Bearer token for authentication with Ambivo API

Implementation Reference

  • The main handler logic for the set_auth_token tool within the handle_call_tool function. Extracts the token argument, checks if provided, calls the helper to set it, caches if enabled, and returns a success message or error.
    if name == "set_auth_token": token = arguments.get("token") if not token: return [ types.TextContent( type="text", text="Error: Authentication token is required" ) ] # Validate and set token api_client.set_auth_token(token) # Cache the token if validation is enabled if config.token_validation_enabled: token_validator.cache_token(token) return [ types.TextContent( type="text", text="Authentication token set successfully. You can now use other tools to query the Ambivo API.", ) ]
  • Tool registration in handle_list_tools(), defining the name, description, and inputSchema for set_auth_token.
    types.Tool( name="set_auth_token", description="Set the authentication token for API requests. " "This must be called before using other tools to authenticate with the Ambivo API.", inputSchema={ "type": "object", "properties": { "token": { "type": "string", "description": "JWT Bearer token for authentication with Ambivo API", } }, "required": ["token"], }, ), ]
  • Input schema for the set_auth_token tool, requiring a 'token' string property.
    inputSchema={ "type": "object", "properties": { "token": { "type": "string", "description": "JWT Bearer token for authentication with Ambivo API", } }, "required": ["token"], },
  • Helper method in AmbivoAPIClient class that sets the auth_token after optional validation.
    def set_auth_token(self, token: str): """Set the authentication token with validation""" try: if self.config.token_validation_enabled: token_validator.validate_token_format(token) self.auth_token = token self.logger.info("Authentication token set successfully") except ValueError as e: self.logger.error(f"Invalid token format: {e}") raise
Install Server

Other Tools

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/ambivo-corp/ambivo-mcp-server'

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