Skip to main content
Glama

Save a campaign context

onelence_save_campaign_context
DestructiveIdempotent

Creates or updates the description of a campaign on a source (objective, promise, audience, landing page, entered spend), matched by source and name. Fields passed replace the stored values, which are not kept; fields left out stay as they are. The preview needs source_key, name. Two steps: call with the change to get a summary and a confirmation_id, show the summary to the user, and only after they agree call again with just confirmation_id.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "onelence_save_campaign_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoCampaign name; the same name updates that campaign.
noteNo
siteNoSite domain (e.g. example.com) or site id. Defaults to the workspace's newest active site.
typeNo
statusNo
promiseNo
audienceNo
objectiveNo
demand_jobNo
source_keyNosource_key from the campaign contexts list, or a source id.
context_urlNo
primary_ctaNo
reported_spendNoSpend the team confirms for this campaign; null clears it.
confirmation_idNoOnly when applying: the confirmation_id from the preview, after the user agreed.
landing_page_urlNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "oneOf": [
      +    {
      +      "properties": {
      +        "confirmation_id": {
      +          "type": "string"
      +        },
      +        "expires_at": {
      +          "type": "string"
      +        },
      +        "next_step": {
      +          "type": "string"
      +        },
      +        "object": {
      +          "const": "write_preview",
      +          "type": "string"
      +        },
      +        "status": {
      +          "const": "confirmation_required",
      +          "type": "string"
      +        },
      +        "summary": {
      +          "properties": {
      +            "details": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "title": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "title",
      +            "details"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "object",
      +        "status",
      +        "confirmation_id",
      +        "expires_at",
      +        "summary",
      +        "next_step"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "properties": {
      +        "object": {
      +          "const": "write_result",
      +          "type": "string"
      +        },
      +        "result": {
      +          "anyOf": [
      +            {
      +              "properties": {
      +                "audience": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "context_url": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "demand_job": {
      +                  "enum": [
      +                    "unknown",
      +                    "create_demand",
      +                    "reframe_demand",
      +                    "capture_demand",
      +                    "convert_demand",
      +                    "retain_demand"
      +                  ],
      +                  "type": "string"
      +                },
      +                "id": {
      +                  "type": "string"
      +                },
      +                "landing_page_url": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "name": {
      +                  "type": "string"
      +                },
      +                "note": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "object": {
      +                  "const": "campaign_context",
      +                  "type": "string"
      +                },
      +                "objective": {
      +                  "enum": [
      +                    "unknown",
      +                    "awareness",
      +                    "traffic",
      +                    "engagement",
      +                    "leads",
      +                    "conversions",
      +                    "sales",
      +                    "retargeting",
      +                    "trust"
      +                  ],
      +                  "type": "string"
      +                },
      +                "primary_cta": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "promise": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "reported_spend": {
      +                  "anyOf": [
      +                    {
      +                      "properties": {
      +                        "amount": {
      +                          "type": "number"
      +                        },
      +                        "currency": {
      +                          "anyOf": [
      +                            {
      +                              "type": "string"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ]
      +                        },
      +                        "period_end": {
      +                          "anyOf": [
      +                            {
      +                              "type": "string"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ]
      +                        },
      +                        "period_start": {
      +                          "anyOf": [
      +                            {
      +                              "type": "string"
      +                            },
      +                            {
      +                              "type": "null"
      +                            }
      +                          ]
      +                        }
      +                      },
      +                      "required": [
      +                        "amount",
      +                        "currency",
      +                        "period_start",
      +                        "period_end"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "source_key": {
      +                  "type": "string"
      +                },
      +                "source_name": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                },
      +                "status": {
      +                  "enum": [
      +                    "unknown",
      +                    "running",
      +                    "paused",
      +                    "ended",
      +                    "draft"
      +                  ],
      +                  "type": "string"
      +                },
      +                "type": {
      +                  "enum": [
      +                    "unknown",
      +                    "ad_campaign",
      +                    "organic_post",
      +                    "referral_placement",
      +                    "email_send",
      +                    "community_post",
      +                    "partner_placement",
      +                    "other"
      +                  ],
      +                  "type": "string"
      +                },
      +                "updated_at": {
      +                  "anyOf": [
      +                    {
      +                      "type": "string"
      +                    },
      +                    {
      +                      "type": "null"
      +                    }
      +                  ]
      +                }
      +              },
      +              "required": [
      +                "object",
      +                "id",
      +                "source_key",
      +                "source_name",
      +                "name",
      +                "type",
      +                "objective",
      +                "demand_job",
      +                "status",
      +                "promise",
      +                "audience",
      +                "primary_cta",
      +                "landing_page_url",
      +                "context_url",
      +                "reported_spend",
      +                "note",
      +                "updated_at"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "status": {
      +          "const": "applied",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "object",
      +        "status",
      +        "result"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds the crucial write semantics they do not: fields passed replace stored values, replaced values are not retained, and omitted fields are left untouched (a PATCH-style partial update). It also discloses the mandatory human-confirmation round trip, which is the main operational risk for an agent. Nothing here contradicts the annotations.

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?

Four sentences, each carrying distinct load: purpose, replacement semantics, preview requirements, and the confirmation workflow. Purpose is front-loaded and the operational constraint follows immediately, with no filler.

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 15-parameter destructive mutation with an output schema available, the description covers the two things an agent cannot infer: the partial-update semantics and the preview/confirm handshake. It does not address authorization requirements or what the preview response contains beyond "a summary," but the output schema and annotations absorb most of that burden.

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 33%, so the description has to compensate, and it does explain the match-by-source-and-name rule plus which fields constitute a campaign description. However, roughly half the 15 parameters (note, site, type, status, demand_job, context_url, primary_cta) get no semantic help in either place. The mention of "entered spend" also drifts slightly from the schema's "Spend the team confirms" wording.

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?

The description opens with a specific verb and resource ("Creates or updates the description of a campaign on a source") and enumerates the domain fields it covers (objective, promise, audience, landing page, spend). It also states the match key (source and name), which lets an agent distinguish this write tool from onelence_list_campaign_contexts without opening either schema.

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?

It gives an unusually explicit two-step protocol: first call with the change to obtain a summary plus confirmation_id, show the summary, then call again with only confirmation_id once the user agrees. It also states the preview's minimum inputs (source_key, name). It stops short of naming alternatives such as listing contexts to obtain the source_key, so it is strong context without full routing guidance.

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.