get_tenant
Retrieve tenant details by ID using the UseGrant MCP Server to manage and access tenant-specific information within the platform.
Instructions
Get a tenant by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The ID of the tenant |
Implementation Reference
- src/index.ts:238-243 (handler)Handler function that retrieves a tenant by ID using the UseGrant SDK and returns it as a JSON string in the MCP response format.async ({ id }) => { const tenant = await usegrant.getTenant(id); return { content: [{ type: 'text', text: JSON.stringify(tenant, null, 2) }], }; },
- src/index.ts:235-237 (schema)Input schema for the get_tenant tool, specifying the required 'id' parameter validated by UgSchema.TenantIdSchema.{ id: UgSchema.TenantIdSchema, },
- src/index.ts:232-244 (registration)Registration of the 'get_tenant' tool on the MCP server, including name, description, input schema, and handler function.server.tool( 'get_tenant', 'Get a tenant by ID', { id: UgSchema.TenantIdSchema, }, async ({ id }) => { const tenant = await usegrant.getTenant(id); return { content: [{ type: 'text', text: JSON.stringify(tenant, null, 2) }], }; }, );