Skip to main content
Glama
kesslerio

Attio MCP Server

by kesslerio

get-workspace-member

Retrieve detailed information about a specific workspace member in Attio CRM using their member ID to access user profiles and permissions.

Instructions

Get details of a specific workspace member

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memberIdYesThe workspace member ID

Implementation Reference

  • The tool handler function `getWorkspaceMember` that handles mock data and delegates to the core API implementation.
    export async function getWorkspaceMember(
      memberId: string
    ): Promise<AttioWorkspaceMember> {
      // Check if we should use mock data for testing
      if (shouldUseMockData()) {
        if (
          process.env.NODE_ENV === 'development' ||
          process.env.VERBOSE_TESTS === 'true'
        ) {
          const { createScopedLogger } = await import('../utils/logger.js');
          createScopedLogger(
            'objects.workspace-members',
            'getWorkspaceMember'
          ).debug('Using mock data for workspace member get');
        }
    
        // Return mock workspace member
        return {
          id: {
            workspace_member_id: memberId,
            workspace_id: 'mock-workspace-id',
          },
          first_name: 'Mock',
          last_name: 'User',
          email_address: 'mock.user@example.com',
          access_level: 'editor' as const,
          created_at: new Date().toISOString(),
          updated_at: new Date().toISOString(),
        } as AttioWorkspaceMember;
      }
    
      return apiGet(memberId);
    }
  • Core API operation that performs the actual HTTP GET request to retrieve the workspace member from Attio API.
    export async function getWorkspaceMember(
      memberId: string,
      retryConfig?: Partial<RetryConfig>
    ): Promise<AttioWorkspaceMember> {
      const api = resolveAttioClient();
      const path = `/workspace_members/${memberId}`;
    
      return callWithRetry(async () => {
        debug(
          'workspace-members.getWorkspaceMember',
          'Fetching workspace member',
          { memberId },
          'getWorkspaceMember',
          OperationType.API_CALL
        );
    
        const res = await api.get<{ data: AttioWorkspaceMember }>(path);
    
        if (!res?.data?.data) {
          throw new Error(
            `Workspace member '${memberId}' not found in current workspace`
          );
        }
    
        return res.data.data;
      }, retryConfig);
    }
  • Tool schema definition including input validation schema, description, and annotations for 'get-workspace-member'.
    {
      name: 'get-workspace-member',
      description: formatToolDescription({
        capability:
          'Retrieve profile and access details for one workspace member.',
        boundaries: 'update member information or change permissions.',
        constraints:
          'Requires workspace_member_id from list/search results; read-only.',
        recoveryHint:
          'Use list-workspace-members to confirm the memberId before retrying.',
      }),
      inputSchema: {
        type: 'object',
        properties: {
          memberId: {
            type: 'string',
            description: 'Workspace member ID (UUID).',
            example: '550e8400-e29b-41d4-a716-446655440000',
          },
        },
        required: ['memberId'],
        additionalProperties: false,
      },
      annotations: {
        readOnlyHint: true,
        idempotentHint: true,
      },
    },
  • Tool configuration object registering the handler and result formatter.
      getWorkspaceMember: {
        name: 'get-workspace-member',
        handler: getWorkspaceMember,
        formatResult: (member: AttioWorkspaceMember | null | undefined) => {
          if (!member) {
            return 'Workspace member not found.';
          }
          const name = [member.first_name, member.last_name]
            .filter(Boolean)
            .join(' ');
          const displayName = name || 'Unknown';
          const email = member.email_address || 'No email';
          const access = member.access_level || 'unknown';
    
          return `Workspace Member Details:
    - Name: ${displayName}
    - Email: ${email}
    - Access Level: ${access}
    - ID: ${member.id.workspace_member_id}
    - Created: ${member.created_at}
    - Updated: ${member.updated_at}`;
        },
      } as ToolConfig,
  • Global tool registry where workspace members tools are registered under ResourceType.WORKSPACE_MEMBERS.
      // Workspace members for user discovery (Issue #684)
      [ResourceType.WORKSPACE_MEMBERS]: workspaceMembersToolDefinitions,
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states a read operation ('Get details'), implying it's non-destructive, but fails to mention permissions, rate limits, error handling, or response format, which are critical for a tool with no structured safety hints.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized for its simple function.

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?

Given the lack of annotations and output schema, the description is incomplete. It does not explain what 'details' are returned, error conditions, or behavioral traits, leaving significant gaps for a tool that retrieves specific member information.

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?

The input schema has 100% description coverage, with 'memberId' documented as 'The workspace member ID'. The description adds no additional meaning beyond this, so it meets the baseline for adequate but unenhanced parameter semantics.

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 verb ('Get details') and resource ('workspace member'), making the purpose understandable. However, it does not differentiate from sibling tools like 'list-workspace-members' or 'search-workspace-members', which reduces specificity.

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?

The description provides no guidance on when to use this tool versus alternatives such as 'list-workspace-members' or 'search-workspace-members'. It lacks context about prerequisites or exclusions, leaving usage ambiguous.

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/kesslerio/attio-mcp-server'

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