Skip to main content
Glama
internal-swagger-mcp

internal-swagger-mcp

by zhangwanli09

Refresh Swagger Cache

swagger_refresh_cache
Idempotent

Force-refetches Swagger documentation and updates the cache after API interfaces change; specify a service or omit it to refresh all services.

Instructions

Force-refetch Swagger documentation data and update the cache.

Use this after the documentation has been updated (interfaces added or modified) to fetch the latest data.

Parameters:

  • source (optional): Service name. Omit to refresh all services.

Returns: Refresh results, including success/failure status and updated interface counts.

Input Schema

NameRequiredDescriptionDefault
sourceNoService name. Omit to refresh the cache for all services.

Output Schema

NameRequiredDescriptionDefault
failedNo
refreshedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.1.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / refreshed / items / properties / fetchedAt / pattern
      Added value: +"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    • addedOutput schema / properties / refreshed / items / properties / totalInterfaces / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / refreshed / items / properties / totalInterfaces / minimum
      Added value: +-9007199254740991
  2. First observedv1.0.5

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false and openWorldHint=true; the description adds the mutation target (the cache) and the reason to invoke, which goes beyond the structured fields. It does not mention cost/latency of a full refetch or any auth/permission requirements, which would have made it 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 short, front-loaded blocks that each serve a distinct purpose, with the action stated first. The 'Returns' line is largely redundant given an output schema exists, costing a little efficiency.

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 single optional-parameter cache-refresh tool with full schema coverage, annotations, and an output schema, the description covers what an agent needs to call it correctly. The main omission is any note about the scope/cost of refreshing all services when 'source' is omitted.

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%, so the schema already documents 'source' including the omit-to-refresh-all behavior. The description's parameter section restates this without adding new syntax, format, or naming conventions, so the baseline 3 applies.

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 and resource ('Force-refetch Swagger documentation data and update the cache'), so the agent knows exactly what operation happens. It does not explicitly contrast itself with the sibling tools (list_sources, search_api, get_api_detail), though the non-overlap is inferable from the name and description.

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?

'Use this after the documentation has been updated (interfaces added or modified) to fetch the latest data' gives a clear triggering condition for invocation. No explicit when-not-to-use guidance or named alternatives are provided, but the context is unambiguous.

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