Skip to main content
Glama

fc_add_space_member

Add users to community spaces by specifying their user ID and space ID, with optional role assignment to manage member permissions.

Instructions

Add a user to a space

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_idYesThe space ID
user_idYesThe user ID to add
roleNoMember role in the spacemember

Implementation Reference

  • The main handler function for the fc_add_space_member tool. It constructs query parameters for user_id and role, then makes a POST request to the WordPress FluentCommunity API endpoint to add the member to the specified space.
    fc_add_space_member: async (args: any) => {
      try {
        // WordPress endpoint expects URL parameters for POST
        const queryParams = new URLSearchParams({
          user_id: args.user_id.toString(),
          role: args.role || 'member',
        });
        
        const response = await makeWordPressRequest('POST', `fc-manager/v1/spaces/${args.space_id}/members?${queryParams.toString()}`);
        return { toolResult: { content: [{ type: 'text', text: JSON.stringify(response, null, 2) }] } };
      } catch (error: any) {
        return { toolResult: { isError: true, content: [{ type: 'text', text: `Error: ${error.message}` }] } };
      }
    },
  • Zod schema defining the input parameters for the fc_add_space_member tool: space_id (required number), user_id (required number), role (optional string, defaults to 'member').
    const addSpaceMemberSchema = z.object({
      space_id: z.number().describe('The space ID'),
      user_id: z.number().describe('The user ID to add'),
      role: z.string().optional().default('member').describe('Member role in the space')
    });
  • Tool registration in the fluentCommunityTools array, specifying the name, description, and input schema reference.
    {
      name: 'fc_add_space_member',
      description: 'Add a user to a FluentCommunity space',
      inputSchema: { type: 'object', properties: addSpaceMemberSchema.shape }
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic action without behavioral details. It doesn't mention potential side effects (e.g., notifications sent), error conditions (e.g., duplicate members), authentication requirements, or rate limits, leaving significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero wasted words. It's front-loaded with the core purpose and appropriately sized for a straightforward tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is insufficient. It lacks details on return values, error handling, permissions, or behavioral implications, making it incomplete for safe and effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters (space_id, user_id, role) adequately. The description adds no additional parameter context beyond what's in the schema, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Add') and resource ('user to a space'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'fc_remove_space_member' or 'fc_list_space_members' beyond the basic verb, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description lacks context about prerequisites (e.g., user/space existence), permissions needed, or comparisons to related tools like 'fc_create_space' or 'fc_remove_space_member'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wplaunchify/fluent-community-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server