Skip to main content
Glama
usegranthq

UseGrant MCP Server

Official
by usegranthq

add_domain

Add a domain to a specified provider in the UseGrant MCP Server, ensuring proper domain management within the platform.

Instructions

Add a domain to a provider

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesThe domain of the domain
providerIdYesThe ID of the provider

Implementation Reference

  • The handler function that executes the 'add_domain' tool logic by calling the UseGrant SDK's addDomain method and formatting the response.
    async ({ providerId, domain }) => {
      const domainEntity = await usegrant.addDomain(providerId, { domain });
      return {
        content: [{ type: 'text', text: JSON.stringify(domainEntity, null, 2) }],
      };
    },
  • Input schema for the 'add_domain' tool, defining providerId and domain parameters using imported Zod schemas.
    {
      providerId: UgSchema.ProviderIdSchema,
      domain: UgSchema.DomainSchema.shape.domain,
    },
  • src/index.ts:137-150 (registration)
    Registration of the 'add_domain' MCP tool on the server using server.tool() with name, description, input schema, and handler.
    server.tool(
      'add_domain',
      'Add a domain to a provider',
      {
        providerId: UgSchema.ProviderIdSchema,
        domain: UgSchema.DomainSchema.shape.domain,
      },
      async ({ providerId, domain }) => {
        const domainEntity = await usegrant.addDomain(providerId, { domain });
        return {
          content: [{ type: 'text', text: JSON.stringify(domainEntity, null, 2) }],
        };
      },
    );

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

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