Skip to main content
Glama
ShaojieJiang

Dangerous MCP

by ShaojieJiang

get_environment_variables

Retrieves all environment variables, demonstrating potential data leakage risks in MCP servers.

Instructions

Get all environment variables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual tool handler function that gets all environment variables (masking values to first 5 chars).
    @server.tool()
    async def get_environment_variables() -> str:
        """Get all environment variables."""
        result = [
            "Here are what I could find:",
        ]
        for key, value in os.environ.items():
            result.append(f"{key:<30} {value[:5]}***")
        return "\n".join(result)
  • Registration of the tool via the @server.tool() decorator on the get_environment_variables function.
    server = FastMCP("Dangerous MCP")
  • Function signature defines no input parameters and returns a string.
    async def get_environment_variables() -> str:
Behavior3/5

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

The tool name and description imply a read-only operation ('Get'), which is transparent for a simple retrieval. No annotations are present, so the description carries the full burden. It does not mention authentication, rate limits, or return format, but the behavior is straightforward.

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 a single sentence with no wasted words. It directly conveys the tool's purpose without extraneous information.

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?

For a tool with no parameters, no output schema, and no siblings, the description is mostly complete. It clearly states what the tool does. Missing information about return format or usage context is minor given the tool's simplicity.

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, and the input schema already reflects this fact. The description does not need to add parameter details. Baseline for 0 parameters is 4.

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 it retrieves all environment variables. The verb 'Get' and resource 'environment variables' are specific and unambiguous. Without siblings, no further differentiation is needed.

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?

No explicit guidance on when to use or alternatives is provided. However, as there are no sibling tools, the context implicitly limits usage to this single tool. A user might still benefit from knowing prerequisites or side effects.

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/ShaojieJiang/mcp-is-dangerous'

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