Skip to main content
Glama

get_dartboard

Retrieve details and task count for a specific dartboard using its ID or name.

Instructions

Get details about a dartboard including task count. Token-efficient lookup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dartboard_idYesDartboard dart_id or name

Implementation Reference

  • Main handler function for get_dartboard tool. Validates input, resolves dartboard name to dart_id, calls API client to get details, returns dart_id, name, description, task_count, and url. Falls back to config data if API returns 404.
    export async function handleGetDartboard(input: GetDartboardInput): Promise<GetDartboardOutput> {
      const DART_TOKEN = process.env.DART_TOKEN;
    
      if (!DART_TOKEN) {
        throw new DartAPIError(
          'DART_TOKEN environment variable is required. Get your token from: https://app.dartai.com/?settings=account',
          401
        );
      }
    
      // Validate input
      if (!input || typeof input !== 'object') {
        throw new ValidationError('Input must be an object', 'input');
      }
    
      if (!input.dartboard_id || typeof input.dartboard_id !== 'string' || input.dartboard_id.trim() === '') {
        throw new ValidationError('dartboard_id is required and must be a non-empty string', 'dartboard_id');
      }
    
      // Resolve dartboard name to dart_id if needed
      const config = await handleGetConfig({ cache_bust: false });
      const dartboard = findDartboard(config.dartboards, input.dartboard_id.trim());
    
      if (!dartboard) {
        const dartboardNames = getDartboardNames(config.dartboards);
        throw new ValidationError(
          `Dartboard "${input.dartboard_id}" not found. Available: ${dartboardNames.slice(0, 5).join(', ')}${dartboardNames.length > 5 ? '...' : ''}`,
          'dartboard_id',
          dartboardNames
        );
      }
    
      const client = new DartClient({ token: DART_TOKEN });
      const dartboardId = typeof dartboard === 'string' ? dartboard : dartboard.dart_id;
      const dartboardName = typeof dartboard === 'string' ? dartboard : dartboard.name;
    
      try {
        const result = await client.getDartboard(dartboardId);
    
        return {
          dart_id: result.dart_id,
          name: result.name || dartboardName,
          description: result.description,
          task_count: result.task_count,
          url: `https://app.dartai.com/b/${result.dart_id}`,
        };
      } catch (error) {
        // If API call fails, return basic info from config
        if (error instanceof DartAPIError && error.statusCode === 404) {
          return {
            dart_id: dartboardId,
            name: dartboardName,
            url: `https://app.dartai.com/b/${dartboardId}`,
          };
        }
        throw error;
      }
    }
  • Input type: GetDartboardInput with dartboard_id (string). Output type: GetDartboardOutput with dart_id, name, optional description and task_count, and url.
    export interface GetDartboardInput {
      dartboard_id: string;
    }
    
    export interface GetDartboardOutput {
      dart_id: string;
      name: string;
      description?: string;
      task_count?: number;
      url: string;
    }
  • src/index.ts:931-944 (registration)
    Tool registration in ListToolsRequestSchema handler. Defines name 'get_dartboard', description, and inputSchema requiring dartboard_id string.
    {
      name: 'get_dartboard',
      description: 'Get details about a dartboard including task count. Token-efficient lookup.',
      inputSchema: {
        type: 'object',
        properties: {
          dartboard_id: {
            type: 'string',
            description: 'Dartboard dart_id or name',
          },
        },
        required: ['dartboard_id'],
      },
    },
  • src/index.ts:1244-1254 (registration)
    Tool call dispatch in CallToolRequestSchema handler. Case 'get_dartboard' calls handleGetDartboard and returns JSON-stringified result.
    case 'get_dartboard': {
      const result = await handleGetDartboard((args || {}) as any);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Helper function getDartboardNames: extracts names from dartboards array for error suggestions.
    export function getDartboardNames(dartboards: (DartBoard | string)[]): string[] {
      return dartboards.map(d => typeof d === 'string' ? d : d.name);
    }
Behavior2/5

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

With no annotations, the description must disclose behavior; it only says 'Get details' and mentions task count, lacking side-effect info or error conditions.

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?

Extremely concise with only two sentences, no filler, and front-loaded purpose.

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?

Adequate for a simple lookup with one param, but lacks description of return value details or edge cases.

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?

Schema covers parameter description fully; description adds no extra meaning beyond 'dartboard dart_id or name'.

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?

Clearly states it retrieves dartboard details including task count, but doesn't differentiate from sibling get tools beyond the resource name.

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 explicit guidance on when to use or alternatives; 'Token-efficient lookup' is vague and doesn't replace 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/standardbeagle/dart-query'

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