Skip to main content
Glama
its-dart

Dart MCP Server

by its-dart

get_doc

Retrieve detailed document information by its unique ID, including title, text content, and folder, using the API on the Dart MCP Server.

Instructions

Retrieve an existing doc by its ID. Returns the doc's information including title, text content, folder, and more.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe 12-character alphanumeric ID of the doc

Implementation Reference

  • Handler for the 'get_doc' tool: validates the document ID using getIdValidated and retrieves the document via DocService.getDoc(id), returning it as JSON.
    case GET_DOC_TOOL.name: {
      const id = getIdValidated(args.id);
      const doc = await DocService.getDoc(id);
      return {
        content: [{ type: "text", text: JSON.stringify(doc, null, 2) }],
      };
    }
  • Schema definition for the 'get_doc' tool, specifying the name, description, and input schema that requires a single 'id' property matching the 12-character alphanumeric pattern.
    export const GET_DOC_TOOL: Tool = {
      name: "get_doc",
      description:
        "Retrieve an existing doc by its ID. Returns the doc's information including title, text content, folder, and more.",
      inputSchema: {
        type: "object",
        properties: {
          id: {
            type: "string",
            description: "The 12-character alphanumeric ID of the doc",
            pattern: "^[a-zA-Z0-9]{12}$",
          },
        },
        required: ["id"],
      },
    };
  • index.ts:192-214 (registration)
    Registration of the 'get_doc' tool by including GET_DOC_TOOL in the TOOLS array, which is returned by the ListToolsRequestSchema handler.
    const TOOLS = [
      // Config
      GET_CONFIG_TOOL,
      // Tasks
      CREATE_TASK_TOOL,
      LIST_TASKS_TOOL,
      GET_TASK_TOOL,
      UPDATE_TASK_TOOL,
      DELETE_TASK_TOOL,
      // Docs
      CREATE_DOC_TOOL,
      LIST_DOCS_TOOL,
      GET_DOC_TOOL,
      UPDATE_DOC_TOOL,
      DELETE_DOC_TOOL,
      // Comments
      ADD_TASK_COMMENT_TOOL,
      LIST_TASK_COMMENTS_TOOL,
      // Other
      GET_DARTBOARD_TOOL,
      GET_FOLDER_TOOL,
      GET_VIEW_TOOL,
    ];
  • index.ts:372-373 (registration)
    The server handler for listing tools, which exposes the TOOLS array containing 'get_doc'.
      tools: TOOLS,
    }));
  • Helper function getIdValidated used in the get_doc handler to validate the input ID against the 12-character alphanumeric pattern.
    const getIdValidated = (strMaybe: any, name: string = "ID"): string => {
      if (typeof strMaybe !== "string" && !(strMaybe instanceof String)) {
        throw new Error(`${name} must be a string`);
      }
      const id = strMaybe.toString();
      if (!ID_REGEX.test(id)) {
        throw new Error(`${name} must be 12 alphanumeric characters`);
      }
      return id;
    };
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 states it 'retrieves' and 'returns' information, implying a read-only operation, but doesn't clarify if it requires authentication, has rate limits, or what happens with invalid IDs (e.g., errors vs. null returns). For a retrieval tool with zero annotation coverage, this leaves significant gaps in understanding its behavior beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, with two sentences that directly state the purpose and return value. Every sentence earns its place by specifying the action (retrieve by ID) and output (doc information including title, text, folder). However, it could be slightly more structured by explicitly listing key return fields or adding usage hints without becoming verbose.

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 low complexity (single parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and return scope but lacks details on error handling, authentication needs, or how it fits with sibling tools. Without an output schema, it hints at return values but doesn't fully specify them, leaving room for improvement in completeness.

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 input schema has 100% description coverage, with the 'id' parameter well-documented in the schema (12-character alphanumeric ID). The description adds no additional parameter semantics beyond what the schema provides, such as examples of IDs or where to obtain them. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 verb 'retrieve' and resource 'existing doc by its ID', specifying it returns doc information. It distinguishes from siblings like create_doc, delete_doc, update_doc, and list_docs by focusing on single-doc retrieval rather than creation, deletion, modification, or listing. However, it doesn't explicitly differentiate from get_folder or get_task, which are similar retrieval operations for other resources.

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 when to choose get_doc over list_docs (e.g., for a specific known ID vs. browsing), or how it relates to get_folder (which might retrieve folder info containing docs). There's no context about prerequisites, such as needing a valid doc ID from list_docs or other sources.

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

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

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