Skip to main content
Glama

scrapewise_update_scraper_group_retention

Idempotent
        Sets the group's count-based data retention: keep only the newest N data runs of EACH
        scraper in the group; older runs' DATA is auto-deleted after a run finishes. The run
        record is kept (visible under "show deleted jobs") because it is a billing premise — only
        the scraped data is removed. A group value GOVERNS every scraper in the group (overrides
        each scraper's own retention). retentionCount=null clears the group limit (each scraper
        then uses its own). Available on every plan.

        Args:
          - id (string, path param, required): the group's MongoDB ObjectId.
          - body (RetentionDTO, required): retentionCount — an integer >= 1, or null to clear.

        Returns:
          The updated GroupDTO (carrying retentionCount).

        Examples:
          - Use when: "keep only the last 5 data runs for every scraper in group {id}" → retentionCount=5
          - Use when: "stop auto-deleting old runs in group {id}" → retentionCount=null
          - Don't use when: you want to limit just one scraper → use scrapewise_update_scraper_retention

        Error Handling:
          - 400 if retentionCount < 1.
          - 400 (CustomerError envelope) if no group with the given id exists for this customer.
          - 401 Unauthorized.
          - 500 INTERNAL.

[runtime hint] This tool returns JSON-as-text — its response shape is dynamic (per-scraper itemsConfig, file binary, etc.) so the MCP outputSchema is omitted. Do not rely on the presence of any specific field in the response; treat the result as a string-or-object blob and parse defensively.

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": {
      "id": "<id>",
      "body": "<body>"
    },
    "name": "scrapewise_update_scraper_group_retention"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesthe group's MongoDB ObjectId.
bodyYesretentionCount — an integer >= 1, or null to clear.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / body / description
      Added value: +"retentionCount — an integer >= 1, or null to clear."
    • addedInput schema / properties / id / description
      Added value: +"the group's MongoDB ObjectId."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing exactly what is removed (scraped data) versus kept (the run record, retained because it is a billing premise), when the deletion fires (after a run finishes), override/governing semantics, and plan availability. This context also explains why destructiveHint=false is defensible: the run record survives.

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?

Front-loaded with the core behavior, then cleanly sectioned into Args, Returns, Examples, and Error Handling. Slightly verbose and the leading indentation is awkward, but nearly every sentence carries actionable information.

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

Completeness5/5

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

For a 2-parameter mutation tool with no output schema, the definition still documents the return value (updated GroupDTO with retentionCount), all three error classes, and the null-clear path. The runtime hint about dynamic JSON responses is the only thing the description itself leaves out, and it is supplied externally.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: retentionCount must be >= 1 or null, null clears the group limit and reverts every scraper to its own setting. That semantic of null is not conveyed by the schema alone.

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?

Opens with a specific verb and resource ("Sets the group's count-based data retention") and immediately scopes it to EACH scraper in the group. The 'Don't use when' line names the sibling tool scrapewise_update_scraper_retention, so an agent can distinguish group-level from scraper-level retention 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 Guidelines5/5

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

Provides explicit when-to-use examples (keep last 5 runs → retentionCount=5; stop auto-deleting → retentionCount=null) plus an explicit exclusion routing to the scraper-level sibling. Prerequisites and scope (overrides per-scraper settings) are stated directly.

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.