Skip to main content
Glama
gdorsi44

XSD Retrieval MCP Server

by gdorsi44

XSD Retrieval MCP Server

A Model Context Protocol (MCP) server for retrieving and analyzing XSD (XML Schema Definition) files.

Description

This MCP server provides tools for retrieving XSD files from URLs or local paths, validating them, and analyzing their elements. Integrates with any LLM model.

Related MCP server: OpenAPI MCP Server

Features

The server provides the following MCP tools:

  1. retrieve_xsd - Retrieve an XSD file from a URL or file path

  2. validate_xsd - Validate if the retrieved content is a valid XSD

  3. list_xsd_elements - List elements defined in an XSD

  4. get_mcp_server_info - Get MCP server information including name and version (v1.2.0+)

Installation

npm install
npm run build

Usage

To run the server:

npm start

The server communicates via stdio and can be integrated with any MCP-compatible client.

Tool: retrieve_xsd

Retrieves an XSD file from a URL or local path.

Parameters:

  • source (string, required): URL or file path to the XSD file

  • save_path (string, optional): Local path where to save the retrieved XSD file

Tool: validate_xsd

Validates if the provided content is a valid XSD.

Parameters:

  • xsd_content (string, required): XSD content to validate

Tool: list_xsd_elements

Lists elements defined in an XSD.

Parameters:

  • xsd_content (string, required): XSD content to analyze

Tool: get_mcp_server_info

Get MCP server information including name and version.

Parameters:

  • None

Recent Improvements (v1.2.0)

  • Enhanced XML/XSD parsing with improved regex patterns for better accuracy

  • Better error handling with graceful degradation for malformed content

  • New get_mcp_server_info tool to retrieve server name and version

  • Improved namespace extraction with proper prefix and URI handling

  • Enhanced element attribute extraction for both self-closing and container elements

  • Better deduplication logic for elements with the same name

  • Added comprehensive test suite with 9 new tests for XML parsing

Contributing

  1. Fork the repository

  2. Create a feature branch (git checkout -b feature/AmazingFeature)

  3. Commit your changes (git commit -m 'Add some AmazingFeature')

  4. Push to the branch (git push origin feature/AmazingFeature)

  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Available Tools

4 tools
get_mcp_server_infoA

Get MCP server information including name and version

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

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

No annotations provided; description is minimal but adequate for a simple read-only tool. No mention of side effects or permissions.

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?

Single sentence, front-loaded with key info, no unnecessary words.

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 simple info tool with no parameters and no output schema, the description covers the essential purpose. Could specify that it requires no input.

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?

No parameters exist, so baseline score of 4 applies; description adds no parameter details because none are needed.

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?

Description clearly states the tool retrieves server information (name and version). It distinguishes from sibling tools which handle XSD operations.

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?

Usage context is implied by the tool's purpose and sibling tools; no explicit when/when-not guidance, but sufficient differentiation.

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

list_xsd_elementsB

Extract and list elements defined in an XSD

ParametersJSON Schema
NameRequiredDescriptionDefault
xsd_contentYesXSD content to analyze

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the burden. It implies a read-only operation but does not confirm non-destructiveness, error handling, or behavior with invalid XSD. It is adequate but lacks explicit behavioral details.

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?

The description is a single, concise sentence. It is efficient, though it could be expanded slightly to include output details without losing conciseness.

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?

The tool has one parameter and no output schema. The description does not clarify the return value format (e.g., list of element names), leaving some uncertainty for the agent. It is adequate for minimal use but incomplete for full understanding.

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 coverage is 100% for one parameter, so baseline is 3. The description adds no extra meaning beyond the parameter name and schema description; it essentially restates the same information.

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 clearly states the action (extract and list) and the resource (elements from an XSD). It distinguishes itself from sibling tools like retrieve_xsd and validate_xsd, which focus on different operations.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like validate_xsd or retrieve_xsd. No conditions, prerequisites, or exclusions are mentioned.

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

retrieve_xsdC

Retrieve an XSD file from a URL or file path

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceYesURL or file path to the XSD file
save_pathNoOptional local path to save the retrieved XSD

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description bears full responsibility. It mentions source type (URL/file path) but does not disclose error behavior (e.g., invalid URL), authentication needs, rate limits, or side effects. The description is too minimal to build accurate mental model of tool behavior.

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 sentence of 11 words, conveying the core purpose without any unnecessary words. It is optimally concise and front-loaded.

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

Completeness2/5

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

The tool has no output schema, leaving return value unspecified. The description says 'Retrieve' but does not clarify what the response contains (e.g., file content as string, or saved to path). While save_path implies possible saving, the return behavior is ambiguous, making the description incomplete for this simple tool.

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 coverage is 100% with both parameters adequately described. The description adds 'Retrieve... from a URL or file path' but this reiterates the existing schema description for 'source'. No additional parameter semantics are provided beyond the schema, achieving the baseline for high coverage.

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?

The description clearly states the action 'Retrieve' and resource 'XSD file' with source specification 'URL or file path'. It adequately distinguishes from sibling tools like 'list_xsd_elements' or 'validate_xsd', though not explicitly. A minor gap is lack of explicit differentiation, but purpose is clear.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives (e.g., get_mcp_server_info, validate_xsd). It only states what it does, leaving the agent to infer usage context without explicit when-to-use or when-not-to-use information.

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

validate_xsdB

Validate if the retrieved content is a valid XSD

ParametersJSON Schema
NameRequiredDescriptionDefault
xsd_contentYesXSD content to validate

TDQS

B3.1/5.0
Behavior2/5

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

The description lacks details on what validation entails (e.g., syntax vs. semantics), return values, or error handling. No annotations compensate.

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?

The description is a single, clear sentence with no unnecessary words, though it could benefit from slight expansion on usage.

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

Completeness2/5

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

For a simple tool with no output schema or annotations, the description is insufficient, failing to explain what the result or error behavior is.

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 coverage is 100%, but the description adds no extra meaning beyond the schema's parameter description, achieving only baseline value.

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 clearly states the tool validates XSD content, which distinguishes it from sibling tools that retrieve or list XSD elements.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives, such as after retrieving XSD content or for checking correctness.

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

TDQS

A3.7/5.0
Disambiguation5/5

Each tool targets a distinct function: server info, XSD retrieval, validation, and element listing. There is no overlap in purpose.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (e.g., retrieve_xsd, validate_xsd).

Tool Count5/5

With only 4 tools, the server is well-scoped for its purpose of XSD retrieval and basic operations. Each tool is necessary and none is redundant.

Completeness4/5

Covers retrieval, validation, and element listing. Missing more granular element detail extraction, but the core workflow is complete for a retrieval-focused server.

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables LLMs to automatically generate Excel files with custom structures, advanced formatting, multiple sheets, formulas, and charts from JSON schemas, with support for both local and remote deployment.
    1
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides retrieval-augmented generation (RAG) capabilities by ingesting various document formats into a persistent ChromaDB vector store. It enables semantic search and retrieval using either OpenAI or Ollama embeddings for processing local files, directories, and URLs.
    1
    MIT

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/gdorsi44/mcp-xsd-retreival'

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