查我与某人的关系
get_relationship【需要登录】返回当前用户与目标用户的关系:following(我是否关注 TA)/ followedBy(TA 是否关注我)/ isFriend(互相关注)/ isSelf。决定是 follow 还是已是好友(好友可见对方「好友可见」链接)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | 目标用户 id |
get_relationship【需要登录】返回当前用户与目标用户的关系:following(我是否关注 TA)/ followedBy(TA 是否关注我)/ isFriend(互相关注)/ isSelf。决定是 follow 还是已是好友(好友可见对方「好友可见」链接)。
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | 目标用户 id |
Changes observed during successful MCP inspections.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false. The description adds the login requirement, which is not present in the annotations, and clarifies the exact meaning of each returned relationship state. No contradiction with annotations exists.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single dense sentence that front-loads the login requirement, states the return object, defines each field, and gives practical decision guidance. Every element earns its place with no redundant filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only tool with one parameter and no output schema, the description is complete: it covers authentication, return value semantics, and the decision context. There are no critical gaps that would prevent an agent from calling this tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already documents userId as '目标用户 id' with 100% coverage, so the description doesn't need to add much. The description adds context about the target user's role in the relationship, but it doesn't provide additional parameter-level detail beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: it returns the relationship between the current user and a target user. It explicitly enumerates the four relationship states (following, followedBy, isFriend, isSelf), making the tool's purpose unmistakable and distinct from siblings like follow_creator or unfollow_creator.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context for when to use this tool: to decide whether to follow the target user or determine they are already a friend. It doesn't explicitly name alternative tools or state when not to use it, but the practical decision context is clear enough to guide tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.