Skip to main content
Glama
usensedata

usensedata-mcp-server-query-china-company

Official
by usensedata

query_company_abnormal_business_operation

Check if a Chinese company has abnormal business operations by querying its full name. Use this tool to verify business compliance and identify potential risks.

Instructions

Query the abnormal business operation information of an company by its full name. Please use the fuzzy query tool to obtain the company full name before calling this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyWordYescompany full name

Implementation Reference

  • Handler function that takes a company full name keyword, calls the shared yushantwo API helper with product ID 'PBB055', and returns the decrypted response as text content.
    async ({keyWord}) => {
      const requestData = {
        keyWord: keyWord
      };
      const prodId = "PBB055";
      const data = await yushantwo(requestData, prodId);
      return {
        content: [
          {
            type: "text",
            text: data,
          },
        ],
      };
    }
  • Zod schema defining the input parameter 'keyWord' as a string representing the company full name.
    {
      keyWord: z.string().describe("company full name")
    },
  • src/index.ts:277-298 (registration)
    Registration of the MCP tool 'query_company_abnormal_business_operation' using server.tool, including description, input schema, and inline handler.
    server.tool(
      "query_company_abnormal_business_operation",
      "Query the abnormal business operation information of an company by its full name. Please use the fuzzy query tool to obtain the company full name before calling this tool.",
      {
        keyWord: z.string().describe("company full name")
      },
      async ({keyWord}) => {
        const requestData = {
          keyWord: keyWord
        };
        const prodId = "PBB055";
        const data = await yushantwo(requestData, prodId);
        return {
          content: [
            {
              type: "text",
              text: data,
            },
          ],
        };
      }
    );
  • Shared utility function used by all tools to make encrypted API calls to the Yushan service, using the provided prodId to specify the query type.
    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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool queries information but does not describe what 'abnormal business operation' entails, the data source, potential rate limits, error conditions, or the format of returned information. For a query 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 concise and front-loaded, consisting of two sentences that directly state the tool's purpose and usage guidelines without unnecessary details. Every sentence adds clear value, making it efficient and well-structured.

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 complexity (a query with one parameter) and the lack of annotations and output schema, the description is partially complete. It covers purpose and usage well but lacks details on behavioral aspects like what data is returned or error handling. It meets minimum viability but has clear gaps in transparency.

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 schema description coverage is 100%, with the parameter 'keyWord' documented as 'company full name.' The description adds minimal value beyond this by reiterating the need for the company's full name but does not provide additional context like formatting requirements or examples. Baseline 3 is appropriate as the schema handles the parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Query') and resource ('abnormal business operation information of a company'), and distinguishes it from siblings by focusing on abnormal business operations rather than basic info, change records, or other company data. It explicitly mentions using the company's full name as input, which aligns with the parameter.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: it instructs to 'use the fuzzy query tool to obtain the company full name before calling this tool,' naming the sibling tool 'fuzzy_query_company' as a prerequisite. This clearly defines the workflow and alternative tool usage.

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