Skip to main content
Glama

ping

Checks if the DeepSeek MCP server is alive, returning version and configuration status. Use before delegating tasks to ensure the server is ready.

Instructions

Health check. Confirms the deepseek-mcp server is alive.

Use this before delegate_to_deepseek if you're not sure whether DeepSeek is configured. Returns version, mode (auto/off), and whether config is loadable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Registers the 'ping' tool via the @mcp.tool() decorator.
    @mcp.tool()
  • The ping tool handler: health-check that returns version, mode (auto/off), and config status.
    @mcp.tool()
    def ping() -> str:
        """Health check. Confirms the deepseek-mcp server is alive.
    
        Use this before delegate_to_deepseek if you're not sure whether DeepSeek is configured.
        Returns version, mode (auto/off), and whether config is loadable.
        """
        mode = os.getenv("DEEPSEEK_MODE", "auto")
        try:
            cfg = Config.load()
            ws_short = _shorten_path(cfg.workspace)
            config_status = f"workspace={ws_short} (sandbox), model={cfg.model}"
        except Exception as e:
            config_status = f"NOT_CONFIGURED ({e})"
        return f"pong from deepseek-mcp v{__version__} | mode={mode} | {config_status}"
  • Helper that shortens paths for display in the ping response (avoids overly long output).
    def _shorten_path(p: Path) -> str:
        """长路径压成 ~ + 最后几段,避免 ping 输出爆屏。"""
        s = str(p)
        home = str(Path.home())
        if s.startswith(home):
            s = "~" + s[len(home):]
        if len(s) > 60:
            parts = s.split("/")
            if len(parts) > 4:
                s = "/".join(parts[:2] + ["..."] + parts[-2:])
        return s
  • Ping has no parameters and returns a string — the schema is implicitly defined by the FastMCP decorator and the function signature.
    @mcp.tool()
    def ping() -> str:
        """Health check. Confirms the deepseek-mcp server is alive.
    
        Use this before delegate_to_deepseek if you're not sure whether DeepSeek is configured.
        Returns version, mode (auto/off), and whether config is loadable.
        """
        mode = os.getenv("DEEPSEEK_MODE", "auto")
        try:
            cfg = Config.load()
            ws_short = _shorten_path(cfg.workspace)
            config_status = f"workspace={ws_short} (sandbox), model={cfg.model}"
        except Exception as e:
            config_status = f"NOT_CONFIGURED ({e})"
        return f"pong from deepseek-mcp v{__version__} | mode={mode} | {config_status}"
Behavior4/5

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

No annotations exist, so the description fully bears the burden. It states the return values (version, mode, config loadable) and implies a safe read operation. However, it does not explicitly state that the tool is non-destructive or requires no permissions, but for a health check, this is acceptable.

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 three sentences long, front-loaded with 'Health check.', and contains no unnecessary words. Every sentence adds value.

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

Completeness5/5

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

Given no parameters and the presence of an output schema (which likely details return structure), the description still lists what the tool returns and provides usage context relative to the sibling tool. It is fully adequate for an agent to understand and invoke this tool correctly.

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?

There are no parameters, so baseline 4 applies. The description does not need to add parameter information.

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 is a health check that confirms server aliveness, and distinguishes it from the sibling tool 'delegate_to_deepseek' by explicitly mentioning its use before that tool.

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

Usage Guidelines5/5

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

The description provides explicit guidance: 'Use this before delegate_to_deepseek if you're not sure whether DeepSeek is configured.' This tells the agent exactly when to use this tool and even mentions an alternative.

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/PsChina/deepseek-as-subagent'

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