Add Team Member
add_workspace_team_memberAdd a team member to the workspace by providing their email and role. Control access and permissions based on assigned roles.
Instructions
Add a team member to the workspace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | Team member email | ||
| role | Yes | Team member role |
Implementation Reference
- server/index.js:196-211 (registration)Registration of the 'add_workspace_team_member' tool using server.registerTool()
server.registerTool( "add_workspace_team_member", { title: "Add Team Member", description: "Add a team member to the workspace.", inputSchema: { email: z.string().describe("Team member email"), role: z.string().describe("Team member role"), }, annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false }, }, async ({ email, role }) => { const data = await apiCall("/v1/workspace/team", "POST", { email, role }); return { content: [{ type: "text", text: JSON.stringify(data?.result ?? data, null, 2) }] }; } ); - server/index.js:201-204 (schema)Input schema for add_workspace_team_member: requires email (string) and role (string)
inputSchema: { email: z.string().describe("Team member email"), role: z.string().describe("Team member role"), }, - server/index.js:207-210 (handler)Handler function that POSTs email and role to /v1/workspace/team
async ({ email, role }) => { const data = await apiCall("/v1/workspace/team", "POST", { email, role }); return { content: [{ type: "text", text: JSON.stringify(data?.result ?? data, null, 2) }] }; } - server/index.js:112-123 (helper)apiCall helper used by the handler to make HTTP requests to the Lindo API
async function apiCall(path, method, body) { const url = `${BASE_URL}${path}`; const res = await fetch(url, { method, headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json", }, ...(body ? { body: JSON.stringify(body) } : {}), }); return res.json(); }