Skip to main content
Glama

Grant secret to project

grant_secrets_add

Share a secret with another project so its resources can use it, returning the grant while ownership stays with the original project.

Instructions

Shares a secret with another project so that project's resources can use it, and returns the grant; ownership doesn't change.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "orgID": "<orgID>",
      "secretID": "<secretID>",
      "target_project_id": "<target_project_id>"
    },
    "name": "grant_secrets_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
orgIDYesOrganization ID (org_...).
secretIDYesSecret ID (sec_...).
target_project_idYesProject ID (proj_...).

Output Schema

NameRequiredDescriptionDefault
idYesIdentifies this grant; use it to revoke the project's access.
org_idYesOrganization the grant and its secret belong to.
secret_idYesSecret shared by this grant.
created_atYesWhen the secret was granted to the project.
target_project_idYesProject that can use the secret through this grant.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.10
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "OrganizationID": {
      +      "pattern": "^org_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "ProjectID": {
      +      "description": "Project ID (proj_...).",
      +      "pattern": "^proj_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "SecretGrantID": {
      +      "pattern": "^sgr_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "SecretID": {
      +      "description": "Secret ID (sec_...).",
      +      "pattern": "^sec_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "Timestamp": {
      +      "format": "date-time",
      +      "type": "string"
      +    }
      +  },
      +  "properties": {
      +    "created_at": {
      +      "$ref": "#/$defs/Timestamp",
      +      "description": "When the secret was granted to the project."
      +    },
      +    "id": {
      +      "$ref": "#/$defs/SecretGrantID",
      +      "description": "Identifies this grant; use it to revoke the project's access."
      +    },
      +    "org_id": {
      +      "$ref": "#/$defs/OrganizationID",
      +      "description": "Organization the grant and its secret belong to."
      +    },
      +    "secret_id": {
      +      "$ref": "#/$defs/SecretID",
      +      "description": "Secret shared by this grant."
      +    },
      +    "target_project_id": {
      +      "$ref": "#/$defs/ProjectID",
      +      "description": "Project that can use the secret through this grant."
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "org_id",
      +    "secret_id",
      +    "target_project_id",
      +    "created_at"
      +  ],
      +  "type": "object"
      +}
  2. Changed3 schema fields changedv0.1.1
    • addedInput schema / properties / orgID / description
      Added value: +"Organization ID (org_...)."
    • addedInput schema / properties / secretID / description
      Added value: +"Secret ID (sec_...)."
    • addedInput schema / properties / target_project_id / description
      Added value: +"Project ID (proj_...)."
  3. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare that this is not read-only, not destructive, and not idempotent, so the safety profile is covered by structured data. The description adds genuinely new behavior: the call returns the grant object, and ownership of the secret is preserved — context an agent cannot get from the annotations. It stops short of saying what happens on a repeat call or whether an existing grant conflicts, which is the remaining gap.

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?

A single sentence with the action first and the ownership caveat second; nothing redundant and no filler. Every clause carries information an agent needs.

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

Completeness4/5

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

An output schema exists and the description notes that a grant is returned, so return values need not be explained further. The mutation profile is well covered by annotations plus the ownership statement. Only the idempotency/duplicate-grant behavior is left unstated for a non-idempotent write tool.

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 all three required parameters documented by pattern and label, so the schema does the heavy lifting. The description only implies the third argument's role ('another project') without adding format, constraint, or edge-case meaning beyond the schema. Baseline 3 applies.

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

Purpose5/5

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

States a specific verb ('shares') and resource ('a secret') plus the effect ('so that project's resources can use it'), and adds the crucial semantic that 'ownership doesn't change', which separates it from a transfer or move operation. An agent can tell from the description alone what state change this produces and on which target.

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

Usage Guidelines3/5

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

The clause 'so that project's resources can use it' implies the situation in which to use it (cross-project access), but there is no explicit statement of when not to use it and no alternative named (e.g., grant_secrets_delete for revocation, or secrets_update for in-project changes). Usage is inferable rather than directed.

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