Skip to main content
Glama

List AsyncAPI Spec Versions

list_asyncapi_spec_versions

List stable AsyncAPI specification versions available as GitHub tags for quick reference.

Instructions

List stable AsyncAPI specification versions available as GitHub tags.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/tools.ts:15-40 (registration)
    Registration of the 'list_asyncapi_spec_versions' tool on the MCP server. Calls listAsyncApiSpecVersions() and formats the JSON response with count and versions array.
    mcpServer.registerTool(
        'list_asyncapi_spec_versions',
        {
            title: 'List AsyncAPI Spec Versions',
            description: 'List stable AsyncAPI specification versions available as GitHub tags.',
        },
        async () => {
            try {
                const versions = await listAsyncApiSpecVersions();
                const output = {
                    count: versions.length,
                    versions,
                };
    
                return {
                    content: [{ type: 'text', text: JSON.stringify(output, null, 2) }],
                    structuredContent: output,
                };
            } catch (error) {
                return {
                    isError: true,
                    content: [{ type: 'text', text: formatUnknownError(error) }],
                };
            }
        }
    );
  • The exported handler function 'listAsyncApiSpecVersions' that delegates to fetchVersionTags().
    export const listAsyncApiSpecVersions = async (): Promise<VersionTag[]> => fetchVersionTags();
  • The 'fetchVersionTags' helper that fetches GitHub tags from the asyncapi/spec repository, filters stable version tags (e.g. v3.0.0), and caches them for 10 minutes.
    const fetchVersionTags = async (): Promise<VersionTag[]> => {
        if (tagCache && Date.now() - tagCache.fetchedAt.getTime() < TAG_CACHE_TTL_MS) {
            return tagCache.tags;
        }
    
        const response = await fetch(ASYNCAPI_SPEC_REPO_TAGS_URL, {
            headers: {
                Accept: 'application/vnd.github+json',
                'User-Agent': 'asyncapi-mcp',
            },
        });
    
        if (!response.ok) {
            throw new Error(`GitHub tags API returned ${response.status} ${response.statusText}`);
        }
    
        const tags = (await response.json()) as GitHubTag[];
        const versionTags = tags
            .map(tag => tag.name)
            .filter(isStableVersionTag)
            .map(tag => ({ tag, version: versionFromTag(tag) }))
            .sort((a, b) => a.version.localeCompare(b.version, undefined, { numeric: true }));
    
        tagCache = {
            tags: versionTags,
            fetchedAt: new Date(),
        };
    
        return versionTags;
    };
  • The VersionTag type used as the return type of listAsyncApiSpecVersions, with 'version' (normalized) and 'tag' (original GitHub tag name) fields.
    type VersionTag = {
        version: string;
        tag: string;
    };
  • The 'isStableVersionTag' regex helper used to filter tags matching a stable semver pattern like v?X.Y.Z.
    const isStableVersionTag = (tag: string): boolean => /^v?\d+\.\d+\.\d+$/.test(tag);
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It only states it lists stable versions from GitHub tags, lacking details on data freshness, rate limits, pagination, or whether it's read-only. Minimal behavioral disclosure.

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?

The description is a single, concise sentence with no unnecessary words. It is front-loaded and efficient.

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

Completeness3/5

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

For a simple list tool with no parameters and no output schema, the description is minimally adequate. However, it does not describe the output format (list of strings, objects, etc.) or any potential side effects, leaving gaps in completeness.

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?

There are no parameters, so schema coverage is 100% trivially. The description adds no parameter-level detail, but given zero parameters, the baseline of 4 is justified.

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 uses the verb 'list' and specifies the resource 'stable AsyncAPI specification versions available as GitHub tags'. It clearly distinguishes from sibling tools which focus on metadata, sections, search, or validation.

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

Usage Guidelines3/5

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

The description implies its use to retrieve version lists but provides no explicit guidance on when to use this tool over alternatives or any exclusions. Given the simple nature, a score of 3 (implied usage) is appropriate.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Souvikns/asyncapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server