Skip to main content
Glama
ComplianceCow

ComplianceCow MCP Server

upload_file

Upload files for compliance rules with automatic format validation and correction. Supports JSON, YAML, CSV, XML, and TOML, returning a file URL for rule configuration.

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

Behavior5/5

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

Excellent disclosure of complex auto-formatting behavior (JSON unescaping, CSV normalization, validation) and side effects (content reformatted, no preview needed) since no annotations exist.

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?

Comprehensive but verbose; detailed Returns section potentially duplicates output schema, and format examples could be condensed while retaining key behavioral signals.

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?

Thorough coverage of complex auto-detection/validation logic justifies length, though return value documentation may overlap with existing output schema.

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?

Comprehensive Args section compensates for 0% schema description coverage, including critical semantic note that JSON content must be stringified.

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?

Clear specific purpose: 'Upload file content and return file URL for use in rules' with explicit verb and resource, distinguishing it from sibling read_file/fetch_output_file tools.

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?

Implies usage context ('for use in rules' and rule_name parameter) but lacks explicit when-to-use guidance comparing it to sibling file operations like read_file.

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