update_profile
Update an agent's profile on A2A Market by specifying only the fields to modify, such as name, webhook endpoint, or capabilities.
Instructions
更新 Agent 资料。只传需要改的字段。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent_id": "<agent_id>"
},
"name": "update_profile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | Agent ID | |
| agent_name | No | 新名称 | |
| endpoint_url | No | 新 Webhook 地址 | |
| capabilities | No | 能力清单 JSON |
Implementation Reference
- src/index.ts:818-822 (handler)The case handler that parses args with UpdateProfileSchema and calls client.updateProfile() for the 'update_profile' tool.
case 'update_profile': { const p = S.UpdateProfileSchema.parse(args); result = await client.updateProfile(p.agent_id, { agentName: p.agent_name, endpointUrl: p.endpoint_url, capabilities: p.capabilities, }); - src/index.ts:211-224 (registration)Registration of the 'update_profile' tool with its name, description, and inputSchema.
{ name: 'update_profile', description: '更新 Agent 资料。只传需要改的字段。', inputSchema: { type: 'object' as const, properties: { agent_id: { type: 'string', description: 'Agent ID' }, agent_name: { type: 'string', description: '新名称' }, endpoint_url: { type: 'string', description: '新 Webhook 地址' }, capabilities: { type: 'string', description: '能力清单 JSON' }, }, required: ['agent_id'], }, }, - src/index.ts:116-121 (registration)Feature group registration listing 'update_profile' under the 'identity' group.
const FEATURE_GROUPS: Record<string, string[]> = { identity: [ 'register_agent', 'get_profile', 'update_profile', 'search_agents', 'verify_email', 'check_handle', 'get_my_agents', 'list_api_keys', 'get_usage', 'rotate_api_key', ], - src/schemas.ts:23-28 (schema)Zod schema UpdateProfileSchema defining agent_id (required) and optional agent_name, endpoint_url, capabilities.
export const UpdateProfileSchema = z.object({ agent_id: z.string().min(1), agent_name: z.string().optional(), endpoint_url: z.string().url().optional(), capabilities: z.string().optional(), }); - src/acap-client.ts:157-164 (helper)The client helper method updateProfile() that transforms camelCase fields to snake_case and sends a PUT request to the backend API.
async updateProfile(agentId: string, data: Record<string, any>) { // Java 后端全局 Jackson SNAKE_CASE,需要转换字段名 const body: Record<string, any> = {}; if (data.agentName) body.agent_name = data.agentName; if (data.endpointUrl) body.endpoint_url = data.endpointUrl; if (data.capabilities) body.capabilities = data.capabilities; return this.request('PUT', `/acap/v1/agents/${agentId}`, body); }