Skip to main content
Glama

set-log-level

Adjust logging levels in the CCXT MCP Server to debug, info, warning, or error for efficient monitoring and troubleshooting of cryptocurrency exchange integrations.

Instructions

Set logging level

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
levelYesLogging level to set

Implementation Reference

  • Inline asynchronous handler function for the 'set-log-level' tool. Receives the level parameter, calls the setLogLevel helper, and returns a text content response confirming the change.
    }, async ({ level }) => {
      setLogLevel(level);
      return {
        content: [{
          type: "text",
          text: `Log level set to ${level}.`
        }]
      };
    });
  • Zod schema definition for the tool input parameter 'level', using enum matching the supported log levels.
    level: z.enum(["debug", "info", "warning", "error"]).describe("Logging level to set")
  • src/index.ts:175-185 (registration)
    Registers the 'set-log-level' tool on the MCP server with description, input schema, and handler function.
    server.tool("set-log-level", "Set logging level", {
      level: z.enum(["debug", "info", "warning", "error"]).describe("Logging level to set")
    }, async ({ level }) => {
      setLogLevel(level);
      return {
        content: [{
          type: "text",
          text: `Log level set to ${level}.`
        }]
      };
    });
  • Core helper function that sets the global currentLogLevel based on string input (mapping to enum values) or direct LogLevel enum, and logs the change.
    export function setLogLevel(level: LogLevel | string): void {
      if (typeof level === 'string') {
        switch (level.toLowerCase()) {
          case 'debug':
            currentLogLevel = LogLevel.DEBUG;
            break;
          case 'info':
            currentLogLevel = LogLevel.INFO;
            break;
          case 'warning':
            currentLogLevel = LogLevel.WARNING;
            break;
          case 'error':
            currentLogLevel = LogLevel.ERROR;
            break;
          default:
            throw new Error(`Unknown log level: ${level}`);
        }
      } else {
        currentLogLevel = level;
      }
      
      log(LogLevel.INFO, `Log level set to: ${LogLevel[currentLogLevel]}`);
    }
  • Type definition enum for LogLevel values, used internally by setLogLevel and matching the strings in the tool schema.
    export enum LogLevel {
      DEBUG = 0,
      INFO = 1,
      WARNING = 2,
      ERROR = 3
    }
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. 'Set logging level' implies a mutation operation, but it doesn't disclose behavioral traits such as whether changes are persistent, require restart, affect performance, have side effects, or what permissions are needed. This is a significant gap for a tool that likely modifies system state.

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 extremely concise at three words, front-loaded with the core action. There's no wasted text or redundancy, making it easy to parse quickly. Every word earns its place by directly stating the tool's function.

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

Completeness2/5

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

Given the complexity of a logging configuration tool with no annotations and no output schema, the description is incomplete. It lacks details on behavior, side effects, return values, or error handling. For a mutation tool that could affect system diagnostics, more context is needed to ensure safe and effective use.

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?

The input schema has 100% description coverage, with the 'level' parameter documented as 'Logging level to set' and an enum of values. The description doesn't add meaning beyond this, such as explaining the impact of each level or default behavior. With high schema coverage, the baseline is 3, as the schema does the heavy lifting.

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

Purpose3/5

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

The description 'Set logging level' states the verb ('Set') and resource ('logging level'), providing a basic purpose. However, it's vague about what exactly is being configured (e.g., system-wide, per-module, or for a specific component) and doesn't distinguish from siblings like 'set-proxy-config' or 'set-leverage' beyond the resource name. It avoids tautology but lacks specificity.

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 offers no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing admin access), context (e.g., debugging vs. production), or exclusions. With siblings like 'clear-cache' or 'test-proxy-connection', there's no indication of how this tool fits into broader workflows, leaving usage unclear.

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

Related 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/doggybee/mcp-server-ccxt'

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