This record as markdown: /tools/io-tinyfn-tinyfn/generate-hmac.md
What generate_hmac does on TinyFn
AI agents invoke generate_hmac to trigger actions in TinyFn. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Secret key |
message | string | Yes | Message to sign |
algorithm | string | — | Hash algorithm: md5, sha1, sha256, sha512 |
Parameters from the server's own tool schema.
Why generate_hmac is rated High
Generating an HMAC involves executing a cryptographic operation using a secret key. While it doesn't modify persistent data (so not Write/Destructive), it is more than a pure read — it actively computes/produces a new artifact. If misused, an AI agent could generate valid authentication tokens or signatures for unauthorized requests.
From the tool's definition Generate HMAC signature — computes a cryptographic signature using a secret key and input data
Attacks that exploit this kind of access
The rule that runs generate_hmac safely
PolicyLayer is an MCP gateway: it sits between your AI agents and TinyFn, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For generate_hmac, this is the rule to start with:
generate_hmac stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect TinyFn, apply this rule, and every generate_hmac call is checked against it from then on.
Questions about generate_hmac
Generate HMAC signature. It is categorised as a Execute tool in the TinyFn MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
generate_hmac accepts 3 parameters: key, message, algorithm. Required: key, message. The full parameter table on this page comes from the server's own tool schema.
Register the TinyFn MCP server in PolicyLayer and add a rule for generate_hmac: 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 TinyFn. Nothing to install.
generate_hmac is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the generate_hmac 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 generate_hmac. 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.
generate_hmac is provided by the TinyFn MCP server (https://api.tinyfn.io/mcp/all/). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on TinyFn, and thousands of servers like it.
Across the catalogue