Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

get_user

Retrieve user profile data from Manifold Markets by providing a username to access account information and activity details.

Instructions

Get user information by username

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesUsername

Implementation Reference

  • Handler function for the 'get_user' tool. Parses input using GetUserSchema, fetches user data from Manifold Markets API by username, and returns the JSON response as text content.
    case 'get_user': {
      const { username } = GetUserSchema.parse(args);
      const response = await fetch(`${API_BASE}/v0/user/${username}`, {
        headers: { Accept: 'application/json' },
      });
    
      if (!response.ok) {
        throw new McpError(
          ErrorCode.InternalError,
          `Manifold API error: ${response.statusText}`
        );
      }
    
      const user = await response.json();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(user, null, 2),
          },
        ],
      };
    }
  • Zod input schema for the 'get_user' tool, requiring a 'username' string.
    const GetUserSchema = z.object({
      username: z.string(),
    });
  • src/index.ts:238-248 (registration)
    Tool registration entry in the listTools response, defining name, description, and inputSchema for 'get_user'.
    {
      name: 'get_user',
      description: 'Get user information by username',
      inputSchema: {
        type: 'object',
        properties: {
          username: { type: 'string', description: 'Username' },
        },
        required: ['username'],
      },
    },

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/bmorphism/manifold-mcp-server'

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