Skip to main content
Glama
usensedata

usensedata-mcp-server-query-china-company

Official
by usensedata

query_company_change_records

Retrieve company change records by entering the full company name to access historical modifications and updates for Chinese enterprises.

Instructions

Query the change records of an company by its full name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entNameYescompany full name

Implementation Reference

  • Handler function that takes company full name (entName), prepares request data, calls the shared yushantwo helper with product ID 'PBB031' to query change records via Yushan API, and returns the decrypted response as text content.
    async ({entName}) => {
      const requestData = {
        entName: entName
      };
      const prodId = "PBB031";
      const data = await yushantwo(requestData, prodId);
      return {
        content: [
          {
            type: "text",
            text: data,
          },
        ],
      };
    }
  • Input schema for the tool: requires 'entName' parameter as a string describing the company full name.
    {
      entName: z.string().describe("company full name"),
    },
  • src/index.ts:183-204 (registration)
    Registration of the 'query_company_change_records' tool using server.tool(), including name, description, Zod input schema, and inline async handler.
    server.tool(
      "query_company_change_records",
      "Query the change records of an company by its full name.",
      {
        entName: z.string().describe("company full name"),
      },
      async ({entName}) => {
        const requestData = {
          entName: entName
        };
        const prodId = "PBB031";
        const data = await yushantwo(requestData, prodId);
        return {
          content: [
            {
              type: "text",
              text: data,
            },
          ],
        };
      }
    );
  • Shared utility function 'yushantwo' that performs AES-encrypted POST requests to the Yushan API using the provided product ID and request data, decrypts the response, and handles errors. Used by multiple tools including this one.
    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";
      }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it's a query operation, implying read-only behavior, but doesn't mention potential side effects, authentication needs, rate limits, or what the output looks like (e.g., format, pagination). For a tool with zero annotation coverage, this is insufficient.

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, clear sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every part of the sentence contributes directly to understanding the tool's function.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'change records' entail, the return format, or any behavioral traits like error handling. For a query tool with no structured output documentation, more context is needed to guide the agent effectively.

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 minimal value beyond the input schema, which already has 100% coverage. It mentions 'full name' for the 'entName' parameter, but the schema description ('company full name') is equivalent. No additional semantics like name format or examples are provided, so it meets the baseline for high schema coverage.

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 action ('Query') and the target resource ('change records of a company'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'query_company_basic_info' or 'query_company_court_litigation_related_info' that also query company information but for different data types.

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 mentions querying by 'full name' but doesn't specify if this is the only method, when to choose it over 'fuzzy_query_company', or any prerequisites like company existence. This leaves the agent without clear usage context.

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