Skip to main content
Glama
usensedata

usensedata-mcp-server-query-china-company

Official
by usensedata

verify_company_name_and_president

Verify Chinese company registration by checking if the legal representative's name matches the official company name. Returns 0 for consistency or 1 for inconsistency.

Instructions

Verification of the two elements of the legal representative's name and company full name. Return 0 to indicate consistency, and return 1 to indicate inconsistency. Please use the fuzzy query tool to obtain the company full name before calling this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operNameYesrepresentative's name
entNameYescompany full name

Implementation Reference

  • Handler function that prepares request data with operName and entName, calls yushantwo API with product ID 'COM030', and returns the response as text content.
    async ({ operName, entName }) => {
      const requestData = {
        operName: operName,
        entName: entName,
      };
      const prodId = "COM030";
      const data = await yushantwo(requestData, prodId);
      return {
        content: [
          {
            type: "text",
            text: data,
          },
        ],
      };
    }
  • Input schema defining parameters operName (representative's name) and entName (company full name) using Zod validation.
    {
      operName: z.string().describe("representative's name"),
      entName: z.string().describe("company full name"),
    },
  • src/index.ts:88-111 (registration)
    Registration of the 'verify_company_name_and_president' tool with MCP server, including name, description, input schema, and handler function.
    server.tool(
      "verify_company_name_and_president",
      "Verification of the two elements of the legal representative's name and company full name. Return 0 to indicate consistency, and return 1 to indicate inconsistency. Please use the fuzzy query tool to obtain the company full name before calling this tool.",
      {
        operName: z.string().describe("representative's name"),
        entName: z.string().describe("company full name"),
      },
      async ({ operName, entName }) => {
        const requestData = {
          operName: operName,
          entName: entName,
        };
        const prodId = "COM030";
        const data = await yushantwo(requestData, prodId);
        return {
          content: [
            {
              type: "text",
              text: data,
            },
          ],
        };
      }
    );
  • Helper function yushantwo that handles API calls to Yushan service: encrypts request body with AES, sends POST request, decrypts and returns response. Used by the tool handler.
    async function yushantwo(requestData: RequestData, prodId: string): Promise<string> {
      const url = "***";
      const reqTime = Date.now();
      const requestSN = Array.from({ length: 32 }, () => "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678"[Math.floor(Math.random() * 58)]).join("");
    
      const requestBody = JSON.stringify({
        prod_id: prodId,
        req_data: requestData,
        req_time: reqTime,
        request_sn: requestSN,
      });
      
      // 加密请求数据
      const encryptedRequest = encrypt(requestBody, apiKey);
    
      const headers = {
        AES_KEY: apiKey,
        ACCT_ID: apiUserId,
        ENCODE: "AES256",
      };
    
      try {
        const response = await fetch(url, {
          method: "POST",
          headers: headers,
          body: encryptedRequest,
        });
    
        const responseText = await response.text();
        
        // 解密返回数据
        const decryptedString = decrypt(responseText, apiKey);
        return decryptedString;
      } catch (e) {
        console.error("Error:", e);
        return "error";
      }
    }
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses the verification logic and return values (0/1), but doesn't mention error handling, performance characteristics, or what constitutes 'consistency' (exact match vs fuzzy). It adds some behavioral context but leaves gaps.

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?

Two concise sentences with zero waste: first states purpose and return values, second provides prerequisite guidance. Every sentence earns its place by adding essential information.

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?

For a verification tool with 2 parameters, 100% schema coverage, and no output schema, the description is adequate but incomplete. It explains the verification purpose and workflow but doesn't define what 'consistency' means or how the verification is performed, leaving the agent to infer the mechanism.

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 description coverage is 100%, so the schema already documents both parameters adequately. The description doesn't add meaning beyond what the schema provides about operName and entName, maintaining the baseline score.

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 tool's purpose: verifying consistency between a legal representative's name and company full name, with specific return values (0 for consistency, 1 for inconsistency). It distinguishes from siblings by focusing on verification rather than querying, though it doesn't explicitly name alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance to use the fuzzy query tool first to obtain the company full name, establishing a clear prerequisite workflow. However, it doesn't specify when NOT to use this tool or name alternative verification methods.

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/usensedata/usensedata-mcp-server-query-china-company'

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