add-project-member
Assign users to a project on Miro MCP by specifying their email and role, ensuring proper access and collaboration within the team and organization.
Instructions
Adds a member to a project (Enterprise only)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | Email ID of the user to add to the project | ||
| orgId | Yes | The ID of the organization to which the project belongs | |
| projectId | Yes | The ID of the project to which you want to add a user | |
| role | Yes | Role to assign to the user | |
| teamId | Yes | The ID of the team to which the project belongs |
Implementation Reference
- src/tools/addProjectMember.ts:16-35 (handler)The asynchronous handler function that executes the tool logic: constructs a request and calls MiroClient.getApi().enterpriseAddProjectMember to add a member to the project, handles errors, and returns the response.fn: async ({ orgId, teamId, projectId, email, role }) => { try { const addProjectMemberRequest = { email, role }; const response = await MiroClient.getApi().enterpriseAddProjectMember( orgId, teamId, projectId, addProjectMemberRequest ); return ServerResponse.text(JSON.stringify(response.body, null, 2)); } catch (error) { process.stderr.write(`Error adding project member: ${error}\n`); return ServerResponse.error(error); } }
- src/tools/addProjectMember.ts:6-15 (schema)The ToolSchema object defining the tool's name, description, and input schema using Zod for validation of orgId, teamId, projectId, email, and role parameters.const addProjectMemberTool: ToolSchema = { name: "add-project-member", description: "Adds a member to a project (Enterprise only)", args: { orgId: z.string().describe("The ID of the organization to which the project belongs"), teamId: z.string().describe("The ID of the team to which the project belongs"), projectId: z.string().describe("The ID of the project to which you want to add a user"), email: z.string().describe("Email ID of the user to add to the project"), role: z.enum(["owner", "editor", "commenter", "viewer"]).describe("Role to assign to the user") },
- src/index.ts:199-199 (registration)The registration of the addProjectMemberTool with the ToolBootstrapper instance..register(addProjectMemberTool)
- src/index.ts:98-98 (registration)The import statement that loads the addProjectMemberTool for registration.import addProjectMemberTool from './tools/addProjectMember.js';