Skip to main content
Glama
cheungxin

JianDaoYun MCP Server

by cheungxin

get_form_data

Retrieve a specific data entry from JianDaoYun forms using app ID, form ID, and data entry ID for form data management.

Instructions

Get a specific data entry from a JianDaoYun form

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appIdYesThe JianDaoYun application ID
appKeyNoThe JianDaoYun application key (API key) (optional, will use JIANDAOYUN_APP_KEY from environment if not provided)
formIdYesThe form ID (can be form ID or app ID)
dataIdYesThe data entry ID

Implementation Reference

  • src/index.ts:304-329 (registration)
    Registration of the 'get_form_data' tool, including name, description, and input schema definition.
    {
      name: 'get_form_data',
      description: 'Get a specific data entry from a JianDaoYun form',
      inputSchema: {
        type: 'object',
        properties: {
          appId: {
            type: 'string',
            description: 'The JianDaoYun application ID',
          },
          appKey: {
            type: 'string',
            description: 'The JianDaoYun application key (API key) (optional, will use JIANDAOYUN_APP_KEY from environment if not provided)',
          },
          formId: {
            type: 'string',
            description: 'The form ID (can be form ID or app ID)',
          },
          dataId: {
            type: 'string',
            description: 'The data entry ID',
          },
        },
        required: ['appId', 'formId', 'dataId'],
      },
    },
  • The MCP tool handler for 'get_form_data', which validates parameters, resolves formId, creates client instance, calls getFormData, and formats response.
    case 'get_form_data': {
      const { formId, dataId } = args as { formId: string; dataId: string };
      const { appId, appKey, baseUrl } = getDefaultParams(args);
      
      // 验证必需参数
      if (!appKey) {
        throw new Error('appKey is required. Please set JIANDAOYUN_APP_KEY in MCP server configuration.');
      }
      if (!appId) {
        throw new Error('appId is required. Please provide it as parameter.');
      }
      
      try {
        // 创建客户端实例
        const jdyClient = new JianDaoYunClient({
          appId,
          appKey,
          baseUrl
        });
        
        const resolved = await resolveFormId(formId, appKey);
        const data = await jdyClient.getFormData(resolved.formId, dataId);
        
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                data,
                formUsed: resolved.formId,
                appId: resolved.appId || appId
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        throw createEnhancedError(error, '获取表单数据');
      }
    }
  • Core implementation in JianDaoYunClient that makes the API POST request to retrieve specific form data entry by ID.
    async getFormData(formId: string, dataId: string): Promise<any> {
      try {
        const response = await this.axios.post<ApiResponse>('/v5/app/entry/data/get', {
          app_id: this.config.appId,
          entry_id: formId,
          data_id: dataId
        });
    
        if (response.data.code !== 0) {
          throw new Error(`Failed to get form data: ${response.data.msg}`);
        }
    
        return response.data.data;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(`API request failed: ${error.response?.data?.msg || error.message}`);
        }
        throw error;
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action without disclosing behavioral traits. It doesn't mention whether this is a read-only operation (implied by 'Get'), error conditions (e.g., invalid IDs), authentication needs (though parameters hint at API keys), or response format. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse quickly.

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 of interacting with a form system, no annotations, and no output schema, the description is incomplete. It doesn't explain what a 'data entry' entails, the return format, or error handling, leaving the agent with insufficient context for reliable use despite the clear schema.

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 description adds no parameter semantics beyond what the schema provides, as schema description coverage is 100% with clear documentation for all parameters. The baseline score of 3 reflects adequate coverage from the schema alone, with the description not compensating but also not detracting.

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 'Get' and the resource 'a specific data entry from a JianDaoYun form', making the purpose understandable. It distinguishes from siblings like 'query_form_data' (which likely retrieves multiple entries) by specifying 'a specific data entry', but could be more explicit about how it differs from 'get_form_fields' (which retrieves form structure rather than data).

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 like 'query_form_data' (for multiple entries) or 'get_form_fields' (for form structure). It lacks context about prerequisites (e.g., needing form and data IDs) or exclusions, leaving the agent to infer usage from the name and parameters 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/cheungxin/jiandaoyun-mcp-server'

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