Skip to main content
Glama
ComplianceCow

ComplianceCow MCP Server

upload_file

Upload file content and return a file URL, with automatic detection and correction of formatting issues in JSON, YAML, TOML, CSV, and XML.

Instructions

Upload file content and return file URL for use in rules.

ENHANCED FILE UPLOAD PROCESS:

  • Automatically detects file format from filename and content

  • Validates and fixes common formatting issues for JSON, YAML, TOML, CSV, XML

  • Accepts JSON arrays in various formats: raw, single-line, multi-line, or escaped (auto-formatted).

  • Normalizes CSV delimiters and whitespace

  • Reformats content with proper indentation/structure

  • No user preview required - validation happens automatically

  • Returns detailed validation results and file URL

SUPPORTED INPUT FORMATS:

  • Raw JSON: {"key": "value"} or [{"key": "value"}]

  • Escaped JSON: "{"key": "value"}"

  • Complex escaped: "[{"repository":"name","owner":"org"}]"

  • Standard strings for other formats (YAML, TOML, CSV, XML)

AUTOMATIC FORMAT PROCESSING:

  • JSON: Detects escaped strings, unescapes, validates syntax, reformats with indentation

  • Raw JSON objects/arrays: Automatically converts to proper JSON string format

  • YAML: Validates structure, reformats with proper indentation

  • TOML: Validates sections and key-value pairs, reformats

  • CSV: Detects delimiter, strips cell whitespace, normalizes format

  • XML: Validates well-formed structure

  • Other formats: Pass through as-is

VALIDATION RESULTS:

  • Returns success/failure status with detailed error messages

  • Provides format-specific validation feedback

  • Indicates if content was automatically reformatted

  • Includes file metadata (size, format, etc.)

Args: rule_name: Descriptive name for the rule (same across all rule inputs) file_name: Name of the file to upload
content: File content (text or base64 encoded) CRITICAL: Must be stringified if JSON content
content_encoding: Encoding of the content (utf-8, base64)

Returns: Dict containing upload results: { success: bool, file_url: str, filename: str, unique_filename: str, file_id: str, file_format: str, content_size: int, validation_status: str, was_formatted: bool, message: str, error: Optional[str] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rule_nameYes
file_nameYes
contentYes
content_encodingNoutf-8

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Since no annotations are provided, the description carries full burden. It details automatic format detection, validation, reformatting, and return of validation results. It also mentions no user preview is required, providing useful behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very long with bullet points and sections, which is well-structured but verbose. Some content could be condensed, but the structure aids scanning.

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?

The description covers all aspects: input parameters, supported formats, automatic processing, validation results, and output structure (including the return dict). Given the complexity, it is thorough and leaves no major gaps.

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

Parameters5/5

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

The input schema has 0% description coverage, but the description's Args section adds critical meaning: rule_name context, content encoding instructions, and the critical note that JSON must be stringified. This fully compensates for the schema's lack of descriptions.

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 uploads file content and returns a URL for use in rules, with a specific verb and resource. It distinguishes the tool as an enhanced file upload with auto-detection and validation, which is distinct from simpler uploads.

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 explains the tool is for use in rules but does not explicitly state when to use it over alternatives like upload_evidence. It lacks exclusions or context about prerequisites, leaving usage partially implied.

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/ComplianceCow/cow-mcp'

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