Skip to main content
Glama

submit_manuscript

Submits a locally saved .docx manuscript to the ReviewMetric 15-agent AI pipeline for automated peer review.

Instructions

Submits a locally saved .docx manuscript to the ReviewMetric 15-agent AI pipeline.

Args: file_path: The absolute path on the local computer to the .docx file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The submit_manuscript function is the handler for the tool. It accepts a file_path argument, checks the file exists and is .docx, then POSTs it to the ReviewMetric /analyze endpoint, returning a run_id on success.
    def submit_manuscript(file_path: str) -> str:
        """
        Submits a locally saved .docx manuscript to the ReviewMetric 15-agent AI pipeline.
        
        Args:
            file_path: The absolute path on the local computer to the .docx file.
        """
        if not os.path.exists(file_path):
            return f"Error: File not found at {file_path}. Please check the path."
        if not file_path.endswith('.docx'):
            return "Error: ReviewMetric currently only supports .docx files."
    
        try:
            with open(file_path, 'rb') as f:
                files = {'file': (os.path.basename(file_path), f, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document')}
                response = requests.post(f"{API_BASE}/analyze", headers=get_headers(), files=files)
            
            if response.status_code in [200, 202]:
                data = response.json()
                run_id = data.get('run_id')
                return f"Success! Manuscript submitted to ReviewMetric. The Run ID is: {run_id}. \n\nClaude, please use the `check_analysis_status` tool with this Run ID to poll for the results every 15 seconds."
            elif response.status_code == 402:
                return "Error: Insufficient ReviewMetric credits. Please top up your account."
            else:
                return f"API Error ({response.status_code}): {response.text}"
                
        except Exception as e:
            return f"Failed to connect to ReviewMetric server: {str(e)}"
  • The @mcp.tool() decorator on line 21 registers submit_manuscript as an MCP tool on the FastMCP server instance.
    @mcp.tool()
    def submit_manuscript(file_path: str) -> str:
  • The docstring defines the schema: accepts a single required parameter 'file_path' (str) representing the absolute path to a .docx file.
    """
    Submits a locally saved .docx manuscript to the ReviewMetric 15-agent AI pipeline.
    
    Args:
        file_path: The absolute path on the local computer to the .docx file.
    """
  • The get_headers() helper function returns the Authorization header using the API_KEY environment variable, used by submit_manuscript.
    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, the description must disclose behavioral traits. It mentions submission to a 15-agent pipeline but omits details on execution time, error handling, or side effects (e.g., file access requirements). Minimal behavioral context.

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

Conciseness5/5

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

The description is two sentences with a structured args list. It is front-loaded with the core purpose and includes only necessary details, with no wasted words.

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

Completeness3/5

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

Given the tool's single parameter and presence of an output schema, the description covers the basic action but lacks details on whether the submission is synchronous or asynchronous, and what the immediate response indicates. It is adequate but not fully informative.

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 description adds meaning to 'file_path' by specifying it must be an absolute local path for a .docx file. Since schema description coverage is 0%, this extra info is valuable but still leaves out format constraints.

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 submits a .docx manuscript to a specific AI pipeline, using a strong verb ('submits') and specifying the resource type and destination. It distinguishes itself from the sibling 'check_analysis_status' by focusing on submission.

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 is provided on when to use this tool versus the sibling 'check_analysis_status' or any prerequisites. The description only states what it does without context on appropriate usage.

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