Skip to main content
Glama

flutter_doctor

Check Flutter development environment setup to identify configuration issues and ensure proper tool installation for mobile app development.

Instructions

Run Flutter doctor to check development environment setup

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function executes 'flutter doctor --machine', falls back to verbose output if machine-readable fails, parses JSON output, and returns structured diagnostic information including issues and status.
    handler: async () => {
      const result = await processExecutor.execute('flutter', ['doctor', '--machine']);
      
      if (result.exitCode !== 0) {
        // Try fallback without --machine flag
        const fallbackResult = await processExecutor.execute('flutter', ['doctor', '-v']);
        
        return {
          success: true,
          data: {
            status: 'completed_with_issues',
            machineOutput: null,
            humanOutput: fallbackResult.stdout,
            issues: fallbackResult.stderr,
            rawExitCode: result.exitCode,
          },
        };
      }
    
      // Parse machine output if available
      let parsedOutput = null;
      try {
        parsedOutput = JSON.parse(result.stdout);
      } catch {
        // If JSON parsing fails, provide raw output
        parsedOutput = null;
      }
    
      return {
        success: true,
        data: {
          status: 'completed',
          machineOutput: parsedOutput,
          rawOutput: result.stdout,
          issues: result.stderr,
          exitCode: result.exitCode,
        },
      };
    }
  • JSON Schema for input validation. flutter_doctor requires no parameters (empty object).
    inputSchema: {
      type: 'object',
      properties: {},
      required: []
    },
  • Registers the flutter_doctor tool in the Map returned by createFlutterTools function, including name, description, schema, and handler.
    tools.set('flutter_doctor', {
      name: 'flutter_doctor',
      description: 'Run Flutter doctor to check development environment setup',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      },
      handler: async () => {
        const result = await processExecutor.execute('flutter', ['doctor', '--machine']);
        
        if (result.exitCode !== 0) {
          // Try fallback without --machine flag
          const fallbackResult = await processExecutor.execute('flutter', ['doctor', '-v']);
          
          return {
            success: true,
            data: {
              status: 'completed_with_issues',
              machineOutput: null,
              humanOutput: fallbackResult.stdout,
              issues: fallbackResult.stderr,
              rawExitCode: result.exitCode,
            },
          };
        }
    
        // Parse machine output if available
        let parsedOutput = null;
        try {
          parsedOutput = JSON.parse(result.stdout);
        } catch {
          // If JSON parsing fails, provide raw output
          parsedOutput = null;
        }
    
        return {
          success: true,
          data: {
            status: 'completed',
            machineOutput: parsedOutput,
            rawOutput: result.stdout,
            issues: result.stderr,
            exitCode: result.exitCode,
          },
        };
      }
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden but only states what the tool does without disclosing behavioral traits. It doesn't mention if this is a read-only check, if it modifies settings, requires specific permissions, has side effects, or provides output details, which is inadequate for a tool with zero annotation coverage.

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 action and purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

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's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate but lacks depth. It explains the basic purpose but doesn't cover behavioral aspects or usage context, which could be improved for better agent guidance, though it meets the minimum for such a straightforward tool.

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, so no parameter information is needed. The description doesn't add any parameter details, which is acceptable given the baseline, but it could have mentioned if any implicit inputs are involved, though not required for a high score in this case.

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 ('Run') and resource ('Flutter doctor'), explaining it checks development environment setup. However, it doesn't explicitly differentiate from sibling tools like 'flutter_setup_environment' or 'health_check', which might have overlapping functionality, so it misses full sibling distinction.

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?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't specify if this should be used before other Flutter commands, or how it differs from 'flutter_setup_environment' or 'health_check' in the sibling list, leaving the agent without context for selection.

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/cristianoaredes/mcp-mobile-server'

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