Skip to main content
Glama
usegranthq

UseGrant MCP Server

Official
by usegranthq

create_tenant_provider_policy

Define policies for tenant providers by specifying conditions, audience, and descriptions to manage access and permissions effectively within the UseGrant MCP Server.

Instructions

Create a new policy for a tenant provider

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
audienceYesThe audience of the tenant provider policy
conditionsYesThe conditions of the tenant provider policy
descriptionYesThe description of the tenant provider policy
nameYesThe name of the tenant provider policy
providerIdYesThe ID of the tenant provider
tenantIdYesThe ID of the tenant

Implementation Reference

  • The handler function for the 'create_tenant_provider_policy' tool. It extracts tenantId, providerId, and payload from args, calls usegrant.createTenantProviderPolicy, and returns the policy as JSON text content.
    async ({ tenantId, providerId, ...payload }) => { const policy = await usegrant.createTenantProviderPolicy(tenantId, providerId, payload); return { content: [{ type: 'text', text: JSON.stringify(policy, null, 2) }], }; },
  • Input schema for the tool, combining TenantIdSchema, TenantProviderIdSchema, and the shape from CreateTenantProviderPolicySchema.
    { tenantId: UgSchema.TenantIdSchema, providerId: UgSchema.TenantProviderIdSchema, ...UgSchema.CreateTenantProviderPolicySchema.shape, },
  • src/index.ts:334-348 (registration)
    Registration of the 'create_tenant_provider_policy' tool using server.tool(), including name, description, input schema, and handler function.
    server.tool( 'create_tenant_provider_policy', 'Create a new policy for a tenant provider', { tenantId: UgSchema.TenantIdSchema, providerId: UgSchema.TenantProviderIdSchema, ...UgSchema.CreateTenantProviderPolicySchema.shape, }, async ({ tenantId, providerId, ...payload }) => { const policy = await usegrant.createTenantProviderPolicy(tenantId, providerId, payload); return { content: [{ type: 'text', text: JSON.stringify(policy, 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