mime_from_extension
MIME Type from File Extension — Look up a file extension (or filename) in a curated IANA media-type table and return its MIME type and top-level category.
This record as markdown: /tools/com-wingmanprotocol-agent-gateway/mime-from-extension.md
What mime_from_extension does on Gateway
AI agents call mime_from_extension to retrieve information from Gateway without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
filename | string | — | Filename to extract the extension from (e.g. 'report.pdf') |
extension | string | — | Extension directly, with or without a leading dot (e.g. 'pdf' or '.pdf') |
Parameters from the server's own tool schema.
Why mime_from_extension is rated Low
The tool performs a read-only lookup operation against a static IANA media-type table. There are no side effects, no data modification, no code execution, and no destructive operations. It simply returns information based on input. The severity is low because even if misused, the tool can only return publicly available MIME type information with no security or operational risk.
From the tool's definition Tool description states 'Look up a file extension (or filename) in a curated IANA media-type table and return its MIME type and top-level category.' This is a pure lookup/query operation that retrieves data without modifying anything.
Risk signalsAccepts file system path (filename)
Attacks that exploit this kind of access
The rule that runs mime_from_extension safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Gateway, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For mime_from_extension, this is the rule to start with:
mime_from_extension is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Gateway, apply this rule, and every mime_from_extension call is checked against it from then on.
Questions about mime_from_extension
MIME Type from File Extension — Look up a file extension (or filename) in a curated IANA media-type table and return its MIME type and top-level category. It is categorised as a Read tool in the Gateway MCP Server, which means it retrieves data without modifying state.
mime_from_extension accepts 2 parameters: filename, extension. The full parameter table on this page comes from the server's own tool schema.
Register the Gateway MCP server in PolicyLayer and add a rule for mime_from_extension: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Gateway. Nothing to install.
mime_from_extension is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the mime_from_extension rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for mime_from_extension. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
mime_from_extension is provided by the Gateway MCP server (https://wingmanprotocol.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Gateway, and thousands of servers like it.
This server
Across the catalogue