Skip to main content
Glama
ngh1105
by ngh1105

check_tools

Verifies that Node.js, GenLayer, Python, and genvm-lint are installed and accessible.

Instructions

Check whether node, genlayer, python, and genvm-lint are available to this MCP server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'check_tools' tool registration and handler. Calls checkCommand for 'node', 'genlayer', 'python', and 'genvm-lint', then returns a response with cwd, privateKeyConfig status, and the checks results.
    server.tool(
      "check_tools",
      "Check whether node, genlayer, python, and genvm-lint are available to this MCP server.",
      {},
      async () => {
        const checks = await Promise.all([
          checkCommand("node"),
          checkCommand("genlayer"),
          checkCommand("python"),
          checkCommand("genvm-lint")
        ]);
    
        return textResponse({
          cwd: processCwd(),
          privateKeyConfig: getPrivateKeyConfigStatus(),
          checks
        });
      }
    );
  • The checkCommand helper function. Runs a command with --version (by default) and returns an object with resolvedCommand, available (boolean), version, error, and exitCode.
    async function checkCommand(command: string, args: string[] = ["--version"]) {
      const result = await runCommand(command, {
        args,
        timeoutMs: 15_000
      });
      const error =
        result.error ||
        result.stderr.trim() ||
        result.stdout.trim() ||
        (result.exitCode === null ? "Command could not be started" : `Command failed with exit code ${result.exitCode}`);
    
      return {
        command,
        resolvedCommand: result.resolvedCommand,
        available: result.exitCode === 0,
        version: result.exitCode === 0 ? result.stdout.trim() || result.stderr.trim() : null,
        error: result.exitCode === 0 ? undefined : error,
        exitCode: result.exitCode
      };
    }
  • Helper function getPrivateKeyConfigStatus used in the check_tools handler to report private key configuration status.
    function getPrivateKeyConfigStatus() {
      const configuredPrivateKey = getConfiguredPrivateKey();
      const normalizedPrivateKey = normalizePrivateKey(configuredPrivateKey.value);
    
      return {
        source: configuredPrivateKey.source,
        configured: Boolean(configuredPrivateKey.value),
        valid: Boolean(normalizedPrivateKey),
        willGenerateOnDeploy: !normalizedPrivateKey,
        note: normalizedPrivateKey
          ? "genlayer_deploy will use the configured private key."
          : "genlayer_deploy will generate a new private key and deploy with it."
      };
    }
  • Helper function textResponse that wraps output in the MCP text content format, used by check_tools handler.
    function textResponse(value: unknown) {
      return {
        content: [
          {
            type: "text" as const,
            text: stringifyJson(value)
          }
        ]
      };
    }
  • src/index.ts:505-523 (registration)
    Registration of the 'check_tools' tool on the MCP server via server.tool(). The schema is an empty object {} (no input parameters).
    server.tool(
      "check_tools",
      "Check whether node, genlayer, python, and genvm-lint are available to this MCP server.",
      {},
      async () => {
        const checks = await Promise.all([
          checkCommand("node"),
          checkCommand("genlayer"),
          checkCommand("python"),
          checkCommand("genvm-lint")
        ]);
    
        return textResponse({
          cwd: processCwd(),
          privateKeyConfig: getPrivateKeyConfigStatus(),
          checks
        });
      }
    );
Behavior4/5

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

No annotations provided, so description carries full burden. It accurately describes a read-only check operation with no side effects. Could mention output format but adequate for simple health check.

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?

Single sentence, front-loaded with purpose, no extraneous words. Highly concise.

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?

No output schema, but the simple check tool's behavior is largely conveyed. Could clarify what 'available' means (e.g., installed, running), but sufficiently complete for low complexity.

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?

No parameters exist, so schema coverage is 100%. Description need not add parameter info. Baseline score of 4 is appropriate.

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?

Description clearly states it checks availability of specific tools (node, genlayer, python, genvm-lint). Verb 'Check' plus explicit list distinguishes it from sibling tools that perform actions like deploy or lint.

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 this tool versus alternatives. It is implied it should be used as a precondition check, but no direct advice or exclusion criteria are provided.

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/ngh1105/genlayer-cli-mcp'

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