Skip to main content
Glama

view

Retrieve and display the full content of an email using its file path from the mu mail indexer.

Instructions

View emails using mu, by providing their paths.

mu view $paths

Paths can be extracted using the following:

mu find --fields "l" SOME_QUERY

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The view tool handler function. Executes `mu view` via subprocess with the provided paths argument.
    @mcp.tool("view")
    def view(paths: str) -> str:
        """View emails using `mu`, by providing their paths.
    
        ```
        mu view $paths
        ```
    
        Paths can be extracted using the following:
        ```
        mu find --fields "l" SOME_QUERY
        ```
        """
        import subprocess
    
        try:
            result = subprocess.run(
                ["mu", "view"] + paths.split(), capture_output=True, text=True, check=True
            )
            return result.stdout.strip()
        except subprocess.CalledProcessError as e:
            return f"Error: {e.stderr.strip()}"
  • mu_mcp/mu_mcp.py:47-47 (registration)
    The view tool is registered with the name "view" via the @mcp.tool("view") decorator on line 47.
    @mcp.tool("view")
  • The schema for the view tool is defined by the function signature `def view(paths: str) -> str`, accepting a single string parameter and returning a string.
    def view(paths: str) -> str:
Behavior2/5

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

No annotations are provided, and the description lacks any behavioral disclosure such as read-only nature, side effects, authentication needs, or error conditions. It only states the basic action.

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 very concise at two sentences plus code examples, with no extraneous information. Every element serves a purpose.

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

Completeness4/5

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

Given the tool's simplicity (one parameter, output schema exists), the description is largely complete. It covers the core action and provides a usage example, though it could mention expected output or behavior.

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?

With 0% schema description coverage, the description adds limited value by mentioning that paths come from mu find, but does not explain path format, constraints, or validation beyond the schema's title 'Paths'.

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 'View emails using mu, by providing their paths,' which is a specific verb and resource. It includes an example and distinguishes from sibling tools like query and get_attachment.

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 provides an example of extracting paths via mu find, implying prerequisites, but does not explicitly state when to use this tool versus alternatives or when not to use it.

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/danielfleischer/mu-mcp'

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