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
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | The domain of the domain | |
| providerId | Yes | The ID of the provider |
Implementation Reference
- src/index.ts:144-149 (handler)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) }], }; },
- src/index.ts:140-143 (schema)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) }], }; }, );