Skip to main content
Glama
Azhar-obenan

Obenan MCP Server

by Azhar-obenan

review_analyzer

Analyze customer reviews to extract insights and answer specific questions about feedback using the Obenan MCP Server's API.

Instructions

Analyze reviews using the Obenan Review Analyzer API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesQuestion or prompt for the review analyzer

Implementation Reference

  • The implementation of the review_analyzer tool, which sends a POST request to an external Obenan API to analyze reviews based on a user prompt.
    async def handle_review_analyzer(
        arguments: dict[str, Any] | None
    ) -> list[types.TextContent]:
        prompt = arguments.get("prompt")
        
        if not prompt:
            return [types.TextContent(
                type="text", 
                text="❌ Error: Prompt is required for review analysis"
            )]
        
        try:
            # Use access token from environment for authorization if needed
            access_token = os.environ.get("OBENAN_LOGIN_ACCESS_TOKEN")
            
            # Prepare the payload with user prompt and hardcoded values
            payload = {
                "prompt": prompt,
                "location_id": [471, 472, 475],
                "thirdPartyReviewSourcesId": [69],
                "companyId": [175]
            }
            
            # Set up headers if token is available
            headers = {}
            if access_token:
                headers["Authorization"] = f"Bearer {access_token}"
            headers["Content-Type"] = "application/json"
            
            # Make the POST request
            url = "https://reviewanalyser.obenan.com/chat"
            response = requests.post(url, json=payload, headers=headers)
            
            if response.status_code == 200:
                data = response.json()
                
                # Format the response for better readability
                formatted_response = f"✅ Review Analysis Result\n\n"
                
                # Add text response if available
                if "response" in data:
                    formatted_response += f"Analysis: {data['response']}\n\n"
                
                # Format graph data if available
                if "graph_response" in data and isinstance(data["graph_response"], dict):
                    graph = data["graph_response"]
                    formatted_response += f"Chart Type: {graph.get('chart_type', 'Unknown')}\n"
                    
                    # Handle columns
                    if "columns" in graph and isinstance(graph["columns"], list):
                        formatted_response += f"Columns: {', '.join(graph['columns'])}\n\n"
                    
                    # Handle data
                    if "data" in graph and isinstance(graph["data"], list):
                        formatted_response += f"Data:\n"
                        for item in graph["data"]:
                            for key, value in item.items():
                                formatted_response += f"  {key}: {value}\n"
                            formatted_response += "\n"
                
                # Include full JSON response for reference
                formatted_response += f"\n===FULL RESPONSE===\n{json.dumps(data, indent=2)}"
                
                return [types.TextContent(type="text", text=formatted_response)]
                
            else:
                error_msg = f"❌ Failed to analyze reviews: HTTP {response.status_code}\n{response.text[:500]}"
                return [types.TextContent(type="text", text=error_msg)]
                
        except Exception as e:
            error_trace = traceback.format_exc()
            return [types.TextContent(
                type="text",
                text=f"🚨 Error analyzing reviews: {str(e)}\n\n{error_trace[:500]}"
            )]
  • Registration of the 'review_analyzer' tool, including its description and input schema.
    types.Tool(
        name="review_analyzer",
        description="Analyze reviews using the Obenan Review Analyzer API",
        inputSchema={
            "type": "object",
            "properties": {
                "prompt": {"type": "string", "description": "Question or prompt for the review analyzer"}
            },
            "required": ["prompt"]
        },
    )
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure but fails to indicate if the operation is read-only, destructive, or idempotent. It does not disclose rate limits, authentication requirements, or what format the analysis results take.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence and appropriately concise, but suffers from under-specification rather than efficient information density. It is front-loaded with the verb and resource, yet wastes the opportunity to provide behavioral details within the same length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool, the description is insufficient given the lack of output schema and annotations. It fails to explain what the Obenan Review Analyzer actually returns or the nature of the analysis performed, leaving critical gaps in the agent's understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage for the single 'prompt' parameter. The description adds no additional semantics about parameter format, expected content, or examples, meeting the baseline expectation when the schema is self-documenting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description identifies the resource (reviews) and action (analyze), but 'analyze' is vague regarding the specific analysis type (sentiment, summarization, extraction). It mentions the Obenan API, providing domain context that distinguishes it from location-focused siblings, though the core purpose remains under-specified.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance provided on when to use this tool versus the location-based siblings (fetch_my_locations, etc.), nor any prerequisites, input constraints, or conditions for optimal use. The agent must infer applicability solely from the tool name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/Azhar-obenan/review-analyzer-mcp-server'

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