delete_tenant_provider_policy
Remove a tenant provider policy by specifying tenant ID, provider ID, and policy ID to manage access and permissions effectively.
Instructions
Delete a policy for a tenant provider
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policyId | Yes | The ID of the tenant provider policy | |
| providerId | Yes | The ID of the tenant provider | |
| tenantId | Yes | The ID of the tenant |
Implementation Reference
- src/index.ts:374-379 (handler)Handler function that executes the tool logic by calling the UseGrant SDK's deleteTenantProviderPolicy method and returning a success response.async ({ tenantId, providerId, policyId }) => { await usegrant.deleteTenantProviderPolicy(tenantId, providerId, policyId); return { content: [{ type: 'text', text: `Policy ${policyId} deleted` }], }; },
- src/index.ts:369-373 (schema)Input schema definition for the tool parameters using Zod schemas from the UseGrant SDK.{ tenantId: UgSchema.TenantIdSchema, providerId: UgSchema.TenantProviderIdSchema, policyId: UgSchema.TenantProviderPolicyIdSchema, },
- src/index.ts:366-380 (registration)Registration of the 'delete_tenant_provider_policy' tool on the MCP server using server.tool, including description, input schema, and handler function.server.tool( 'delete_tenant_provider_policy', 'Delete a policy for a tenant provider', { tenantId: UgSchema.TenantIdSchema, providerId: UgSchema.TenantProviderIdSchema, policyId: UgSchema.TenantProviderPolicyIdSchema, }, async ({ tenantId, providerId, policyId }) => { await usegrant.deleteTenantProviderPolicy(tenantId, providerId, policyId); return { content: [{ type: 'text', text: `Policy ${policyId} deleted` }], }; }, );