Skip to main content
Glama
williamzujkowski

Strudel MCP Server

diagnostics

Retrieve browser diagnostics to identify cache issues, errors, and performance metrics for troubleshooting Strudel.cc music coding sessions.

Instructions

Get detailed browser diagnostics including cache, errors, and performance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary implementation of the diagnostics tool: collects browser connection status, page load status, editor readiness, audio connection, cache info, and error statistics via Puppeteer page evaluations.
    async getDiagnostics(): Promise<BrowserDiagnostics> {
      const diagnostics: BrowserDiagnostics = {
        browserConnected: this.browser !== null,
        pageLoaded: this._page !== null,
        editorReady: false,
        audioConnected: false,
        cacheStatus: {
          hasCache: this.editorCache.length > 0,
          cacheAge: this.cacheTimestamp > 0 ? Date.now() - this.cacheTimestamp : 0
        },
        errorStats: this.errorRecovery.getErrorStats()
      };
    
      if (this._page) {
        try {
          diagnostics.editorReady = await this._page.evaluate(() => {
            return document.querySelector('.cm-content') !== null;
          });
    
          diagnostics.audioConnected = await this._page.evaluate(() => {
            return (window as any).strudelAudioAnalyzer?.isConnected || false;
          });
        } catch (error) {
          this.logger.warn('Failed to get diagnostics', error);
        }
      }
    
      return diagnostics;
  • Tool registration definition in the getTools() array, specifying name, description, and empty input schema for MCP tool listing.
    {
      name: 'diagnostics',
      description: 'Get detailed browser diagnostics including cache, errors, and performance',
      inputSchema: { type: 'object', properties: {} }
    },
  • MCP tool dispatcher in executeTool switch statement: handles 'diagnostics' calls, checks browser initialization, and delegates to StrudelController.getDiagnostics().
    case 'diagnostics':
      if (!this.isInitialized) {
        return {
          initialized: false,
          message: 'Browser not initialized. Run init first for full diagnostics.'
        };
      }
      return await this.controller.getDiagnostics();
  • TypeScript interface defining the structure of BrowserDiagnostics returned by the diagnostics tool.
    export interface BrowserDiagnostics {
      browserConnected: boolean;
      pageLoaded: boolean;
      editorReady: boolean;
      audioConnected: boolean;
      cacheStatus: {
        hasCache: boolean;
        cacheAge: number;
      };
      errorStats: Record<string, ErrorStats>;
    }
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. It mentions what the tool retrieves (cache, errors, performance) but does not specify if this is a read-only operation, if it requires permissions, or details about output format or rate limits. This leaves significant gaps in understanding the tool's behavior.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded with the main action and resource, making it easy to parse quickly.

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 and no output schema, the description is minimally adequate by stating what diagnostics are retrieved. However, it lacks details on output format, behavioral traits, or usage context, which are important for a diagnostic tool. This results in a moderate score, as it meets basic needs but leaves gaps.

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 input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description does not add parameter information, but since there are no parameters, this is acceptable. It implies the tool operates without inputs, which is clear from context, justifying a baseline score of 4.

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 with a specific verb ('Get') and resource ('detailed browser diagnostics'), and it enumerates the types of diagnostics (cache, errors, performance). However, it does not explicitly distinguish this tool from potential siblings like 'performance_report' or 'show_errors', which might overlap in functionality, so it falls short of a perfect score.

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. For example, it does not clarify if this is for general diagnostics or specific scenarios, nor does it mention prerequisites or exclusions. This lack of context leaves the agent without clear usage instructions.

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/williamzujkowski/strudel-mcp-server'

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