Skip to main content
Glama

list_contacts

Retrieve all account contacts or get specific contact details by ID to manage domain registrar information.

Instructions

List all contacts in the account, or get details of a specific contact by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contact_idNoIf provided, get details for this specific contact ID

Implementation Reference

  • The list_contacts tool implementation, which accepts an optional contact_id. If contact_id is provided, it fetches a single contact; otherwise, it lists all contacts using the client.
    server.tool(
      "list_contacts",
      "List all contacts in the account, or get details of a specific contact by ID.",
      {
        contact_id: z
          .string()
          .optional()
          .describe("If provided, get details for this specific contact ID"),
      },
      async ({ contact_id }) => {
        try {
          if (contact_id) {
            const result = await client.getContact(contact_id);
            return {
              content: [
                { type: "text" as const, text: JSON.stringify(result, null, 2) },
              ],
            };
          }
          const result = await client.listContacts();
          return {
            content: [
              { type: "text" as const, text: JSON.stringify(result, null, 2) },
            ],
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return {
            content: [
              { type: "text" as const, text: `Failed to list contacts: ${msg}` },
            ],
            isError: true,
          };
        }
      }
    );

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/mikusnuz/dynadot-mcp'

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