Skip to main content
Glama

get_dartboards

Retrieve available dartboards from a specified space using the space DUID to organize and manage workspace resources.

Instructions

Get available dartboards

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_duidYesSpace DUID to get dartboards from

Implementation Reference

  • Handler for the 'get_dartboards' tool call. Constructs Python code to retrieve and print available dartboards from the user's bundle (default dartboards), executes it via runDartCommand, and returns the output as text content.
                    case 'get_dartboards': {
                        console.error('[Debug] Handling get_dartboards request');
                        const pythonCode = `    # Get dartboards for the space
    print("[Debug] Getting dartboards", file=sys.stderr)
    try:
        # Get dartboards from the bundle
        dartboards = bundle.dartboards
        print("[Debug] Got dartboards:", dartboards, file=sys.stderr)
        if not dartboards:
            print("No dartboards found")
            sys.exit(1)
        # Print dartboard titles
        print("Available dartboards:")
        for d in dartboards:
            print(f"- {d['title']} (DUID: {d['duid']})")
    except Exception as e:
        print(f"[Debug] Error getting dartboards: {str(e)}", file=sys.stderr)
        sys.exit(1)`;
    
                        // Add proper indentation to the Python code
                        const command = pythonCode.split('\n').map(line => line.length > 0 ? '    ' + line : line).join('\n');
    
                        console.error('[Debug] Running Python command for getting dartboards');
                        const output = await this.runDartCommand(command);
                        console.error('[Debug] Get dartboards output:', output);
                        const response = {
                            content: [{
                                type: 'text',
                                text: output,
                            }],
                        };
                        return response;
                    }
  • src/index.ts:333-344 (registration)
    Registration of the 'get_dartboards' tool in the ListTools response, including name, description, and input schema (note: schema requires space_duid, but handler does not use it).
    name: 'get_dartboards',
    description: 'Get available dartboards',
    inputSchema: {
        type: 'object',
        properties: {
            space_duid: {
                type: 'string',
                description: 'Space DUID to get dartboards from',
            }
        },
        required: ['space_duid'],
    },
  • Input schema definition for the 'get_dartboards' tool, specifying a required space_duid parameter.
    name: 'get_dartboards',
    description: 'Get available dartboards',
    inputSchema: {
        type: 'object',
        properties: {
            space_duid: {
                type: 'string',
                description: 'Space DUID to get dartboards from',
            }
        },
        required: ['space_duid'],
    },
  • Helper method runDartCommand used by all tools including get_dartboards to execute dynamic Python code via child_process.spawn, which interacts with the Dart library.
        async runDartCommand(args) {
            return new Promise((resolve, reject) => {
                // Use pyenv Python
                const pythonPath = '/Users/speed/.pyenv/shims/python';
                console.error('[Debug] Running Python command with:', pythonPath);
                
                const command = `import sys
    import os
    import traceback
    import json
    from dart import Dart, Operation, OperationKind, OperationModelKind, TaskCreate, TaskUpdate, TransactionKind, TaskSourceType, SpaceCreate
    from dart.generated.types import UNSET
    from dart.dart import _Session, UserBundle, _make_duid
    from dart.generated.models.icon_kind import IconKind
    from dart.generated.models.sprint_mode import SprintMode
    from dart.generated.models.validation_error_response import ValidationErrorResponse
    
    def initialize():
        print("[Debug] Starting Python execution", file=sys.stderr)
        print("[Debug] Current directory:", os.getcwd(), file=sys.stderr)
        print("[Debug] PYTHONPATH:", os.environ.get('PYTHONPATH'), file=sys.stderr)
        print("[Debug] DART_TOKEN:", os.environ.get('DART_TOKEN'), file=sys.stderr)
        
        session = _Session()
        print("[Debug] Session created", file=sys.stderr)
        bundle = UserBundle(session)
        print("[Debug] UserBundle created", file=sys.stderr)
        dartboard_duid = bundle.default_dartboard["duid"]
        print(f"[Debug] Got dartboard DUID: {dartboard_duid}", file=sys.stderr)
        client = Dart()
        print("[Debug] Dart client created", file=sys.stderr)
        
        return client, bundle, dartboard_duid
    
    def run_command(client, bundle, dartboard_duid):
        ${args}
    
    def main():
        client, bundle, dartboard_duid = initialize()
        run_command(client, bundle, dartboard_duid)
    
    try:
        main()
    except Exception as e:
        print(f"Error: {str(e)}", file=sys.stderr)
        traceback.print_exc(file=sys.stderr)
        sys.exit(1)`;
                
                console.error('[Debug] Python command:', command);
    
                // Create a clean environment without virtual env variables
                const env = { ...process.env };
                delete env.VIRTUAL_ENV;
                delete env.CONDA_PREFIX;
                delete env.CONDA_DEFAULT_ENV;
                delete env.CONDA_PYTHON_EXE;
    
                const childProcess = spawn(pythonPath, ['-c', command], {
                    env: {
                        ...env,
                        PYTHONUNBUFFERED: '1',
                        PYTHONPATH: process.env.PYTHONPATH || process.cwd(),
                        DART_TOKEN: process.env.DART_TOKEN,
                    },
                    stdio: ['pipe', 'pipe', 'pipe'],
                });
    
                let output = '';
                let errorOutput = '';
    
                childProcess.stdout?.on('data', (data) => {
                    const str = data.toString();
                    console.error('[Debug] Python stdout:', str);
                    output += str;
                });
    
                childProcess.stderr?.on('data', (data) => {
                    const str = data.toString();
                    console.error('[Debug] Python stderr:', str);
                    errorOutput += str;
                });
    
                childProcess.on('error', (error) => {
                    console.error('[Debug] Python process error:', error);
                    reject(new Error(`Failed to start Python process: ${error.message}`));
                });
    
                // Add timeout
                const timeout = setTimeout(() => {
                    console.error('[Debug] Python command timed out');
                    childProcess.kill();
                    reject(new Error('Command timed out'));
                }, 30000); // 30 second timeout
    
                childProcess.on('close', (code) => {
                    clearTimeout(timeout);
                    console.error(`[Debug] Python process exited with code ${code}`);
                    if (code === 0) {
                        resolve(output.trim());
                    } else {
                        reject(new Error(errorOutput || `Command failed with exit code ${code}`));
                    }
                });
            });
        }
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 of behavioral disclosure. 'Get available dartboards' implies a read-only operation, but it doesn't specify what 'available' means (e.g., accessible vs. all), whether it requires authentication, rate limits, pagination, or the return format. This leaves significant gaps for a tool with no 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 with zero waste. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place without redundancy.

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 (a read operation with one required parameter), no annotations, and no output schema, the description is incomplete. It doesn't explain what 'available' entails, the return structure, or error conditions. For a tool with minimal structured data, more context is needed to guide the agent effectively.

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 schema description coverage is 100%, with the single parameter 'space_duid' documented as 'Space DUID to get dartboards from'. The description adds no additional parameter semantics beyond implying that dartboards are retrieved from a space. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 'Get available dartboards' clearly states the verb 'Get' and resource 'dartboards', making the purpose understandable. However, it doesn't distinguish this tool from potential siblings like 'get_folders' or 'get_default_space' beyond the resource name, and the term 'available' adds some specificity but could be more precise.

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 doesn't mention prerequisites (e.g., needing a space DUID), exclusions, or how it differs from other 'get' tools in the sibling list. The agent must infer usage from the parameter alone.

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/jmanhype/dart-mcp-server'

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