Skip to main content
Glama

scrapewise_update_scraper_retention

Idempotent
        Sets this scraper's count-based data retention: keep only the newest N data runs; 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.
        If the scraper's GROUP sets a retention value, the group's value wins. retentionCount=null
        clears the per-scraper limit. Available on every plan.

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

        Returns:
          The updated ScraperDTO (config.retentionCount reflects the new value).

        Examples:
          - Use when: "keep only the last 10 data runs for scraper {id}" → retentionCount=10
          - Use when: "remove the per-scraper run limit on scraper {id}" → retentionCount=null
          - Don't use when: the scraper's group already sets retention → the group value wins; change it on the group

        Error Handling:
          - 400 if retentionCount < 1.
          - 400 (CustomerError envelope) if no scraper 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_retention"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesthe scraper'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 scraper'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?

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false; the description adds genuinely new context beyond those: only scraped DATA is deleted while the run record persists for billing, deletion happens automatically after a run finishes (not during this call), group precedence applies, and it is available on every plan. This deferred-deletion nuance explains why destructiveHint is false despite eventual data removal.

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-loads the core behavior in the first sentence, then organizes Args, Returns, Examples, and Error Handling as scannable sections. Slightly verbose in the repeated explanation of run-record retention, but no sentence is idle filler.

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?

With no output schema, the description explains the return value (updated ScraperDTO with config.retentionCount reflecting the new value) and the runtime hint about JSON-as-text parsing. It also enumerates error codes (400 invalid count, 400 missing scraper, 401, 500), which is complete for a simple two-parameter config setter.

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 schema carries the baseline. The description still adds meaning the schema does not fully encode: that retentionCount=null clears the limit (the schema only shows an integer with minimum 1) and that 'id' is the scraper's MongoDB ObjectId in the path. This nudges it above the baseline 3.

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 and resource: it sets a scraper's count-based retention (keep newest N data runs). It also distinguishes itself from the sibling 'scrapewise_update_scraper_group_retention' by explaining that a group-level value overrides this one, so an agent can choose between them 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 'Use when' examples (set limit to 10, clear limit with null) and a 'Don't use when' clause pointing to the group-level tool when group retention is already set. The conditions that select this tool versus the alternative are spelled out rather than inferred.

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.