# Tines → PDF with makesPDF

> For AI agents: a documentation index is available at https://makespdf.com/llms.txt — every docs page also has a markdown twin (append .md to the page URL), including this one: https://makespdf.com/docs/integrations/tines.md

[Tines](https://www.tines.com/) stories can act as an MCP client: the **AI Agent** action takes tools from an external MCP server. That lets a story call makesPDF through our hosted MCP server, alongside the agent's other tools. Every makesPDF MCP tool is available to the agent.

## Connect

You need a makesPDF [API key](https://makespdf.com/settings/api-keys?ref=tines).

1. Open your **AI Agent** action in the storyboard to see its properties.
2. Scroll down, click **+ Add tool**, and under **Tines Tools** select **MCP**.
3. Click **New MCP connection**.
4. Set **MCP server name** (for example makesPDF) and **MCP server URL** to `https://makespdf.com/api/v1/mcp`.
5. Under **Advanced options**, leave **Transport type** on **Streamable HTTP** and add a header in **Headers**: `Authorization` with the value `Bearer <makesPDF API key>`. Leave **Credentials** empty: it is also sent as the `Authorization` header and would override this one.
6. Click **Connect**. The server's tools appear in the agent next to its other tools.

## Render a PDF

The agent chooses the tool from its instructions, so describe the document and which tool to use. It can call:

| Tool | Arguments | What it does |
| --- | --- | --- |
| `render_markdown` | `markdown`, optional `options` | Markdown → PDF (1 credit per 10 pages) |
| `render_template` | `templateId`, `data` | A stored or library template filled with your data |
| `validate_markdown` | `markdown` | Free accessibility check before you render |
| `list_templates` | optional `q`, `category`, `tags` | Find a library template such as `invoice-classic` |

Each render result carries `pageCount`, `creditsDeducted`, `artifactId` and a `downloadUrl`.

## Get the file

`downloadUrl` is a signed link that needs no API key, so any step that downloads a URL can fetch the PDF. The link expires 15 minutes after the render. To fetch an older render, call `get_render_download_url` with its `artifactId` for a fresh link (free).

## Billing and limits

Renders bill your makesPDF credits exactly like the API: 1 credit per 10 pages on success, nothing on failure. Validation and listing tools are free. On the Free and Hobbyist plans, unless the account holds Growth credits, each page carries a small makespdf.com link. Tines's own charges are separate. The full tool reference is on the [MCP page](https://makespdf.com/docs/mcp).
