Skip to main content
Glama

crafty_get_stats

Retrieve host system statistics from Crafty Controller, including CPU, RAM, disk usage, and boot time data for monitoring and analysis.

Instructions

Get Crafty Controller host system stats: CPU usage/count/frequency, RAM usage/total/percent, disk data (device, total, used, free, percent, filesystem, mount), and boot time

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for 'crafty_get_stats', which makes an HTTP request to the Crafty Controller to fetch system statistics.
    async () => {
      try {
        const data = await client.get("/crafty/stats");
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      } catch (error) {
        const msg = error instanceof Error ? error.message : String(error);
        return { content: [{ type: "text", text: `Error: ${msg}` }], isError: true };
      }
    }
  • Registration of the 'crafty_get_stats' tool within the MCP server using the 'server.tool' method.
    server.tool(
      "crafty_get_stats",
      "Get Crafty Controller host system stats: CPU usage/count/frequency, RAM usage/total/percent, disk data (device, total, used, free, percent, filesystem, mount), and boot time",
      {},
      async () => {
        try {
          const data = await client.get("/crafty/stats");
          return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: "text", text: `Error: ${msg}` }], isError: true };
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description only lists what data is returned but does not disclose behavioral traits such as whether this is a read-only operation, potential rate limits, authentication requirements, or error conditions. It lacks critical information for safe and effective use.

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 a single, dense sentence that efficiently lists all returned metrics without unnecessary words. It is front-loaded with the core purpose ('Get Crafty Controller host system stats') and then enumerates the data. While slightly long due to the list, every part earns its place by specifying the output.

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 has no parameters, no annotations, and no output schema, the description adequately covers what the tool does by listing the returned metrics. However, it lacks behavioral context (e.g., read-only status, auth needs) and does not differentiate from sibling tools, leaving gaps in completeness for an agent to use it correctly in context.

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 tool has 0 parameters with 100% schema description coverage (empty schema). The description does not need to explain parameters, and it appropriately focuses on the output semantics by detailing the metrics returned (CPU, RAM, disk, boot time). This adds value beyond the schema, which is minimal here.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Get Crafty Controller host system stats' followed by specific metrics (CPU, RAM, disk, boot time). It uses a specific verb ('Get') and identifies the resource ('host system stats'), but does not explicitly differentiate from the sibling tool 'server_get_stats' which likely provides server-specific stats rather than host-level stats.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention the sibling tool 'server_get_stats' or explain the distinction between host-level and server-level statistics, nor does it provide any context about prerequisites or when this tool is appropriate.

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/HadiCherkaoui/crafty-mcp'

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