Skip to main content
Glama
Selenium39

Weibo MCP Server

get_profile

Retrieve detailed profile information for a specific Weibo user by providing their unique identifier.

Instructions

获取指定微博用户的详细资料信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidYes微博用户的唯一标识符

Implementation Reference

  • src/server.ts:35-46 (registration)
    Registration of the 'get_profile' MCP tool, including input schema (uid: number), description, and inline handler function that delegates to WeiboCrawler.extractWeiboProfile(uid) and returns JSON-formatted profile.
    server.tool("get_profile",
      "获取指定微博用户的详细资料信息",
      { 
        uid: z.number().describe("微博用户的唯一标识符")
      },
      async ({ uid }) => {
        const profile = await crawler.extractWeiboProfile(uid);
        return {
          content: [{ type: "text", text: JSON.stringify(profile) }]
        };
      }
    );
  • Core implementation of profile extraction: performs HTTP GET request to the Weibo profile API URL with default headers, extracts userInfo from response, handles errors by returning empty object.
    async extractWeiboProfile(uid: number): Promise<Record<string, any>> {
      try {
        const response = await axios.get(PROFILE_URL.replace('{userId}', uid.toString()), {
          headers: DEFAULT_HEADERS
        });
        return response.data.data.userInfo;
      } catch (error) {
        console.error(`无法获取UID为'${uid}'的用户资料`, error);
        return {};
      }
    }
  • API endpoint URL template used for fetching user profiles, with {userId} placeholder.
    export const PROFILE_URL = 'https://m.weibo.cn/api/container/getIndex?type=uid&value={userId}';
  • Default HTTP headers used in profile extraction requests.
    export const DEFAULT_HEADERS = { 'Content-Type': 'application/json' };
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 the tool retrieves detailed profile information but doesn't specify aspects like whether it's read-only, requires authentication, has rate limits, or what format the output takes. This leaves significant gaps in understanding the tool's behavior beyond its basic purpose.

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 that directly states the tool's purpose without any unnecessary words or fluff. It's front-loaded with the essential information, making it highly efficient and easy to understand at a glance.

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 address behavioral traits like safety, authentication needs, or output format, which are crucial for a tool that likely involves external API calls. For a tool with no structured metadata, the description should provide more context to be fully helpful.

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 'uid' parameter clearly documented as '微博用户的唯一标识符' (Weibo user's unique identifier). The description doesn't add any additional parameter details beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage without extra value.

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 ('获取' meaning 'get') and the resource ('微博用户的详细资料信息' meaning 'detailed profile information of a Weibo user'). It specifies what the tool does without being tautological. However, it doesn't explicitly differentiate from sibling tools like 'search_users', which might also retrieve user information but with different scopes or methods.

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 any prerequisites, context, or comparisons to sibling tools such as 'search_users', leaving the agent to infer usage based solely on the tool name and description without explicit direction.

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/Selenium39/mcp-server-weibo'

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