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) }],
        };
      },
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states 'Create' which implies a write/mutation operation, but doesn't disclose behavioral traits like required permissions, whether the policy is immediately active, idempotency, error conditions, or what happens on success (e.g., returns policy ID). This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (6 required parameters for a mutation tool), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what a 'tenant provider policy' is, how it's used, or what the tool returns, leaving significant gaps for the agent to operate effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with each parameter well-documented in the schema (e.g., 'audience', 'conditions', 'description'). The description adds no parameter semantics beyond what the schema provides, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('new policy for a tenant provider'), making the purpose understandable. It distinguishes from siblings like 'delete_tenant_provider_policy' and 'get_tenant_provider_policy' by specifying creation, but doesn't differentiate from other creation tools (e.g., 'create_tenant', 'create_provider') beyond the resource type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., existing tenant and provider), exclusions, or relationships with sibling tools like 'create_tenant_provider' or 'list_tenant_provider_policies'. The agent must infer usage from the tool name and schema alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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