create_tenant
Add a new tenant to the UseGrant MCP Server by specifying a name and description, enabling efficient management of tenant-specific configurations and resources.
Instructions
Create a new tenant
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | The description of the tenant | |
| name | Yes | The name of the tenant |
Implementation Reference
- src/index.ts:224-229 (handler)The handler function for the 'create_tenant' tool. It takes the payload, calls usegrant.createTenant(payload) from the UseGrant SDK, and returns the tenant object as a JSON-formatted text content response.async (payload) => { const tenant = await usegrant.createTenant(payload); return { content: [{ type: 'text', text: JSON.stringify(tenant, null, 2) }], }; },
- src/index.ts:220-230 (registration)Registration of the 'create_tenant' MCP tool using server.tool(), including the tool name, description, input schema, and inline handler function.server.tool( 'create_tenant', 'Create a new tenant', UgSchema.CreateTenantSchema.shape, async (payload) => { const tenant = await usegrant.createTenant(payload); return { content: [{ type: 'text', text: JSON.stringify(tenant, null, 2) }], }; }, );
- src/index.ts:223-223 (schema)The input schema for the 'create_tenant' tool, referencing UgSchema.CreateTenantSchema.shape from the imported UseGrant SDK schema module.UgSchema.CreateTenantSchema.shape,