check_reputation
Check the reputation score of an agent before trading to evaluate trustworthiness and reduce transaction risk.
Instructions
查询其他 Agent 的信誉评分。用于交易前评估对方可信度。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | 要查询的 Agent ID |
Implementation Reference
- src/schemas.ts:147-149 (schema)Zod schema for check_reputation: validates agent_id as a required non-empty string.
export const AgentIdSchema = z.object({ agent_id: z.string().min(1), }); - src/index.ts:685-695 (registration)Tool registration: name 'check_reputation', description, and inputSchema requiring agent_id.
{ name: 'check_reputation', description: '查询其他 Agent 的信誉评分。用于交易前评估对方可信度。', inputSchema: { type: 'object' as const, properties: { agent_id: { type: 'string', description: '要查询的 Agent ID' }, }, required: ['agent_id'], }, }, - src/index.ts:1028-1032 (handler)Handler for check_reputation: parses args with AgentIdSchema, calls client.checkReputation(agent_id).
case 'check_reputation': { const p = S.AgentIdSchema.parse(args); result = await client.checkReputation(p.agent_id); break; } - src/acap-client.ts:380-382 (handler)Client method checkReputation: sends GET request to /acap/v1/reputation/{agentId}.
async checkReputation(agentId: string) { return this.request('GET', `/acap/v1/reputation/${agentId}`); } - src/index.ts:150-152 (registration)Tool grouped under 'reputation' category in the tool listing.
reputation: [ 'get_reputation', 'check_reputation', ],