Skip to main content
Glama

get_default_space

Retrieve the default space DUID with this tool, enabling efficient workspace management and organization in the Dart MCP Server environment.

Instructions

Get the default space DUID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_default_space' tool. It constructs embedded Python code that retrieves the first space from the user's bundle.spaces as the default space and prints its DUID. This Python code is executed via the shared runDartCommand method, and the output is returned as tool response.
    case 'get_default_space': { console.error('[Debug] Handling get_default_space request'); // Note: Using raw string with proper indentation for the run_command function const pythonCode = ` # Get default space print("[Debug] Getting default space", file=sys.stderr) try: spaces = bundle.spaces print("[Debug] Got spaces:", spaces, file=sys.stderr) if not spaces: print("No spaces found") sys.exit(1) default_space = spaces[0] print(f"Default space DUID: {default_space['duid']}") except Exception as e: print(f"[Debug] Error getting space: {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 default space'); const output = await this.runDartCommand(command); console.error('[Debug] Get default space output:', output); const response = { content: [{ type: 'text', text: output, }], }; return response; }
  • The schema definition for the 'get_default_space' tool, specifying no input parameters.
    name: 'get_default_space', description: 'Get the default space DUID', inputSchema: { type: 'object', properties: {}, required: [], }, },
  • src/index.ts:232-513 (registration)
    The tool is registered by including it in the tools list returned by the ListToolsRequestSchema handler.
    const tools = [ { name: 'get_default_status', description: 'Get the default status DUIDs', inputSchema: { type: 'object', properties: {}, required: [], }, }, { name: 'get_default_space', description: 'Get the default space DUID', inputSchema: { type: 'object', properties: {}, required: [], }, }, { name: 'create_task', description: 'Create a new Dart task', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Title of the task', }, description: { type: 'string', description: 'Description of the task', }, priority: { type: 'string', description: 'Priority of the task', enum: ['Low', 'Medium', 'High', 'Critical'], }, tags: { type: 'array', items: { type: 'string', }, description: 'Tags for the task', }, size: { type: 'number', description: 'Size/complexity of the task (1-5)', minimum: 1, maximum: 5, }, assignee_duids: { type: 'array', items: { type: 'string', }, description: 'List of assignee DUIDs', }, subscriber_duids: { type: 'array', items: { type: 'string', }, description: 'List of subscriber DUIDs', } }, required: ['title', 'description'], }, }, { name: 'update_task', description: 'Update an existing task', inputSchema: { type: 'object', properties: { duid: { type: 'string', description: 'DUID of the task to update', }, status_duid: { type: 'string', description: 'New status DUID', }, title: { type: 'string', description: 'New title for the task', }, description: { type: 'string', description: 'New description for the task', }, priority: { type: 'string', description: 'New priority for the task', enum: ['Low', 'Medium', 'High', 'Critical'], } }, required: ['duid'], }, }, { 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'], }, }, { name: 'get_folders', description: 'Get available folders', inputSchema: { type: 'object', properties: { space_duid: { type: 'string', description: 'Space DUID to get folders from', } }, required: ['space_duid'], }, }, { name: 'create_folder', description: 'Create a new folder in a space', inputSchema: { type: 'object', properties: { space_duid: { type: 'string', description: 'Space DUID to create the folder in', }, title: { type: 'string', description: 'Title of the folder', }, description: { type: 'string', description: 'Description of the folder', }, kind: { type: 'string', description: 'Kind of folder', enum: ['Default', 'Reports', 'Other'], default: 'Default' } }, required: ['space_duid', 'title'], }, }, { name: 'create_doc', description: 'Create a new document or report', inputSchema: { type: 'object', properties: { folder_duid: { type: 'string', description: 'Folder DUID to create the document in', }, title: { type: 'string', description: 'Title of the document', }, text: { type: 'string', description: 'Content of the document', }, text_markdown: { type: 'string', description: 'Markdown content of the document', }, report_kind: { type: 'string', description: 'Kind of report (if creating a report)', enum: ['Changelog', 'Standup'], }, editor_duids: { type: 'array', items: { type: 'string', }, description: 'List of editor DUIDs', }, subscriber_duids: { type: 'array', items: { type: 'string', }, description: 'List of subscriber DUIDs', } }, required: ['folder_duid', 'title'], }, }, { name: 'create_space', description: 'Create a new space', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Title of the space' }, description: { type: 'string', description: 'Description of the space' }, abrev: { type: 'string', description: 'Short abbreviation for the space' }, accessible_by_team: { type: 'boolean', description: 'Whether the space is accessible by the whole team', default: true }, accessible_by_user_duids: { type: 'array', items: { type: 'string' }, description: 'List of user DUIDs who can access the space' }, icon_kind: { type: 'string', enum: ['None', 'Icon', 'Emoji'], description: 'Kind of icon to use', default: 'None' }, icon_name_or_emoji: { type: 'string', description: 'Icon name or emoji character' }, color_hex: { type: 'string', description: 'Color in hex format (e.g. #FF0000)' }, sprint_mode: { type: 'string', enum: ['None', 'ANBA'], description: 'Sprint mode for the space', default: 'None' }, sprint_replicate_on_rollover: { type: 'boolean', description: 'Whether to replicate sprints on rollover', default: false }, sprint_name_fmt: { type: 'string', description: 'Sprint name format' } }, required: ['title'] } }, { name: 'delete_space', description: 'Delete a space and all its contents', inputSchema: { type: 'object', properties: { space_duid: { type: 'string', description: 'DUID of the space to delete' } }, required: ['space_duid'] } } ]; console.error('[Debug] Sending tools response:', JSON.stringify(tools, null, 2)); return { tools }; });

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

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