Skip to main content
Glama

Upsert Policy

upsert-policy
DestructiveIdempotent

Create or update a workflow policy file on the platform (plans/knowledge/policies/*.policy.md). policyFileName is coerced to *.policy.md (same as get-policies). Prefer after writing the file locally so the policy is available immediately (git sync also works later).

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": {
      "policyFileName": "<policyFileName>",
      "content": "<content>"
    },
    "name": "upsert-policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
botIdNoQA bots: your botId from your stored TestChimp binding.
contentYes
projectIdNoThe TestChimp project this repo belongs to: projectId from the repo's .testchimp/creds.json. Pass it on every call when working in a repo. Not a secret.
projectApiKeyNoProject API key. QA bots: required on every call except get-bot-credentials, get-project-credentials and get-bot-compat. Others: only to look up a repo's projectId via get-project-credentials when its creds file has a key but no projectId. Prefer projectId. Never print it.
policyFileNameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / projectApiKey / description
      Previous value: -"QA bots: your own project API key from your stored TestChimp binding. Required on every call except get-bot-credentials, get-project-credentials and get-bot-compat. Never print it."New value: +"Project API key. QA bots: required on every call except get-bot-credentials, get-project-credentials and get-bot-compat. Others: only to look up a repo's projectId via get-project-credentials when its creds file has a key but no projectId. Prefer projectId. Never print it."
    • addedInput schema / properties / projectId
      Added value: +{
      +  "description": "The TestChimp project this repo belongs to: projectId from the repo's .testchimp/creds.json. Pass it on every call when working in a repo. Not a secret.",
      +  "maxLength": 64,
      +  "minLength": 1,
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / botId
      Added value: +{
      +  "description": "QA bots: your botId from your stored TestChimp binding.",
      +  "maxLength": 64,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / projectApiKey
      Added value: +{
      +  "description": "QA bots: your own project API key from your stored TestChimp binding. Required on every call except get-bot-credentials, get-project-credentials and get-bot-compat. Never print it.",
      +  "maxLength": 256,
      +  "minLength": 8,
      +  "type": "string"
      +}
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is supplied structurally. The description adds non-obvious behavior beyond that: policyFileName is coerced to *.policy.md (same rule as get-policies) and the write makes the policy immediately available versus a later git sync. It does not state that an existing policy's content is replaced wholesale, which is the main destructive consequence, so it stops short of a 5.

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

Conciseness4/5

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

Three compact sentences with the core action and target path front-loaded, followed by the coercion rule and the timing guidance. Every sentence carries information; the only mild slack is the parenthetical '(same as get-policies)', which is nonetheless useful cross-reference.

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?

For a 5-parameter mutation tool with no output schema and annotations already covering idempotency/destructiveness, the description covers purpose, destination path, filename normalization and execution timing. What remains missing is the nature of the payload (content) and confirmation that existing policy text is overwritten.

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 coverage is 60%: botId, projectId and projectApiKey are documented in-schema, while content and policyFileName are not. The description usefully explains the policyFileName coercion rule, compensating for one of the two gaps, but says nothing about what 'content' should contain or how it relates to the target path.

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?

States a specific verb pair ('Create or update') plus the resource ('workflow policy file') and even the on-platform location (plans/knowledge/policies/*.policy.md), so the agent knows exactly what is written and where. It partially differentiates from the sibling get-policies by referencing the shared filename convention, though it does not explicitly distinguish itself from upsert-plans-support-file.

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

Usage Guidelines4/5

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

'Prefer after writing the file locally so the policy is available immediately (git sync also works later)' gives a real when-to-use rule and names the alternative path (git sync). It lacks an explicit 'do not use when' clause, but the ordering guidance and alternative are concrete enough to steer selection.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.