team_update
Modify team details such as name and wallet address on Buu AI MCP Server to ensure accurate and updated team information.
Instructions
[PRIVATE] Update team data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New name for the team | |
| wallet | No | New wallet address for the team |
Implementation Reference
- src/tools/TeamTools.ts:283-294 (handler)The async handler function that executes the core logic of the team_update tool by calling the GraphQL updateTeamDataMutation with provided name and/or wallet.async ({ name, wallet }) => { try { const response = await client.request(updateTeamDataMutation, { name, wallet }); return { content: [{ type: 'text', text: JSON.stringify(response) }] }; } catch (error) { console.error('Error calling team_update:', error); return { isError: true, content: [{ type: 'text', text: `Error: Failed to update team. ${error}` }], }; } }
- src/tools/TeamTools.ts:279-282 (schema)Zod input schema defining optional 'name' and 'wallet' parameters for the team_update tool.{ name: z.string().optional().describe('New name for the team'), wallet: z.string().optional().describe('New wallet address for the team'), },
- src/tools/TeamTools.ts:276-295 (registration)The server.tool call that registers the team_update tool, including its description, input schema, and inline handler function.server.tool( 'team_update', '[PRIVATE] Update team data.', { name: z.string().optional().describe('New name for the team'), wallet: z.string().optional().describe('New wallet address for the team'), }, async ({ name, wallet }) => { try { const response = await client.request(updateTeamDataMutation, { name, wallet }); return { content: [{ type: 'text', text: JSON.stringify(response) }] }; } catch (error) { console.error('Error calling team_update:', error); return { isError: true, content: [{ type: 'text', text: `Error: Failed to update team. ${error}` }], }; } } );
- src/tools/TeamTools.ts:91-117 (helper)GraphQL mutation definition used by the team_update handler to update team data.const updateTeamDataMutation = gql` mutation UpdateTeamData($name: String, $wallet: String) { updateTeamData(name: $name, wallet: $wallet) { ... on Team { _id type name creator wallet members { address role status } available pending confirmed updatedAt createdAt } ... on HandledError { code message } } } `;