Skip to main content
Glama

check_analysis_status

Check the status of a scientific peer review analysis and retrieve its final report using a unique run ID.

Instructions

Checks the status or retrieves the final report of a ReviewMetric analysis.

Args: run_id: The unique UUID of the analysis run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool is registered as an MCP tool via the @mcp.tool() decorator on line 51.
    @mcp.tool()
    def check_analysis_status(run_id: str) -> str:
  • The input schema: takes a single 'run_id' string parameter. The docstring describes the tool's purpose.
    """
    Checks the status or retrieves the final report of a ReviewMetric analysis.
    
    Args:
        run_id: The unique UUID of the analysis run.
    """
  • The handler logic: makes a GET request to {API_BASE}/status/{run_id}, interprets the response status (queued/running/completed/failed), and returns appropriate messages.
    try:
        response = requests.get(f"{API_BASE}/status/{run_id}", headers=get_headers())
        
        if response.status_code == 200:
            data = response.json()
            status = data.get("status")
            
            if status == 'queued':
                pos = data.get('queue_position', 0) + 1
                eta = data.get('eta_minutes', '?')
                return f"Status: QUEUED. Position in line: {pos}. Estimated time: {eta} minutes. Claude, wait a bit and check again."
                
            elif status == 'running':
                step = data.get("current_step", "Processing...")
                return f"Status: RUNNING. Current Step: {step}. Claude, wait 45 seconds and check again. If you hit your tool loop limit, gracefully tell the user the current step and ask them to prompt you to check again."
                
            elif status == 'completed':
                # Return the beautiful JSON report directly to Claude's brain!
                report = data.get("summary_report", {})
                return f"Status: COMPLETED. Here is the final ReviewMetric JSON report. Claude, please summarize this for the user:\n\n{json.dumps(report, indent=2)}"
                
            elif status == 'failed':
                error = data.get("error_message", "Unknown error")
                return f"Status: FAILED. The pipeline crashed with error: {error}"
            
            else:
                return f"Status: {status.upper()}"
                
        else:
            return f"API Error ({response.status_code}): {response.text}"
            
    except Exception as e:
        return f"Failed to connect to ReviewMetric server: {str(e)}"
  • Helper function get_headers() used by the handler to set the Authorization header with the API key.
    def get_headers():
        if not API_KEY:
            raise ValueError("REVIEWMETRIC_API_KEY environment variable is missing.")
        return {"Authorization": f"Bearer {API_KEY}"}
Behavior2/5

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

With no annotations provided, the description carries full burden. It only states the tool checks status or retrieves report, but fails to disclose idempotency, side effects, error handling, or whether it requires prior submission. This is minimal behavioral insight.

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

Conciseness4/5

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

The description is brief and front-loaded with the main purpose. The Args section is standard but not wasteful. It could be slightly tighter by integrating the parameter information into the main sentence, but still concise.

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?

Given the presence of an output schema (not shown but indicated), the description does not need to detail return values. However, it lacks context on how the tool fits into the workflow (e.g., must be called after submit_manuscript), what happens if run_id is invalid, or whether it is polling versus one-shot. The description is incomplete for a tool with no annotations.

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

Parameters4/5

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

The schema has one required parameter 'run_id' with only type and title. The description adds meaning by specifying it as 'the unique UUID of the analysis run', which clarifies the expected format beyond the schema. Since schema coverage is 0%, this addition is valuable.

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

Purpose5/5

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

The description clearly states the tool checks status or retrieves a final report of a ReviewMetric analysis. The verb ('checks', 'retrieves') and resource ('ReviewMetric analysis') are specific, and it distinguishes from the sibling tool 'submit_manuscript' which handles a different workflow step.

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

Usage Guidelines3/5

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

The description implies the tool is used after submitting an analysis (sibling 'submit_manuscript'), but no explicit guidance on when to check status versus retrieve report, nor any exclusions or prerequisites. The usage context is somewhat clear but lacks depth.

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/vktr93/reviewmetric-mcp'

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