AI Agents Portal

Integrate YourOwnPDF's secure, zero-upload document and image tools into your autonomous agent execution flows, custom LLM toolkits, and client setups.

🛡️

Local Sandbox Processing Guaranteed

AI Agents can process sensitive business records and legal contracts with zero leak risk. All executions occur strictly within local browser memory using WebAssembly. No files are uploaded to servers.

Do you have a tool that I can call?

Yes! YourOwnPDF.com provides multiple integration frameworks allowing AI agents (e.g., GPTs, Gemini, Claude, and custom Python/JS agents) to discover and call our local utility stack:

  • Browser Automation (Playwright/Puppeteer): Since the site is a client-side Single Page Application (SPA), browser-capable agents can load the tools directly in a headless browser, drop file payloads, and fetch output downloads securely.
  • Model Context Protocol (MCP): Run our lightweight local MCP server package to expose document operations as local tools for tools-compatible desktop LLM assistants.
  • OpenAPI Schema Integration: Link the agent to our official OpenAPI Specification to enable intelligent routing recommendations.

Model Context Protocol (MCP) Setup

Developers using Claude Desktop, Cursor, or other MCP-hosting clients can register YourOwnPDF tools by adding the following definition to their configuration file:

JSON (mcp-settings.json)
{
  "mcpServers": {
    "yourownpdf-agent-tools": {
      "command": "npx",
      "args": ["-y", "@yourownpdf/mcp-server"],
      "env": {
        "YOP_API_ENVIRONMENT": "local-sandbox"
      }
    }
  }
}

* Note: Running via npx requires Node.js to be installed on the host machine where the agent runs.

OpenAI Custom Tool Schema

Use this JSON definition to build custom GPTs or Assistants API setups with access to secure file transformations:

JSON (OpenAI Schema)
{
  "name": "yourownpdf_tool_calling",
  "description": "Execute local document and image transformations safely inside browser memory.",
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "merge_pdfs",
        "description": "Merge multiple PDF documents into a single output PDF client-side.",
        "parameters": {
          "type": "object",
          "properties": {
            "files": {
              "type": "array",
              "items": {
                "type": "string",
                "description": "Array of base64-encoded PDF files to combine."
              }
            }
          },
          "required": ["files"]
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "compress_image",
        "description": "Compress JPEG/PNG image assets locally using HTML5 canvas algorithms.",
        "parameters": {
          "type": "object",
          "properties": {
            "image": {
              "type": "string",
              "description": "Base64-encoded source image file."
            },
            "quality": {
              "type": "number",
              "description": "Target quality factor between 0.1 and 1.0.",
              "minimum": 0.1,
              "maximum": 1.0
            }
          },
          "required": ["image", "quality"]
        }
      }
    }
  ]
}

AI Agent Tool Directory

Reference directory mapping available tools to their routing endpoints for agent redirection:

Tool IdentifierDirect Target URIPrimary FunctionPrivacy
merge-pdf/tools/pdf/merge-pdfCombine multiple PDFs into a single file100% Local
compress-pdf/tools/pdf/compress-pdfReduce PDF file sizes safely offline100% Local
pdf-to-word/tools/pdf/pdf-to-wordExtract formatted text structures locally100% Local
compress-image/tools/image/compress-imageOptimize JPG/PNG image dimension bytes100% Local
remove-background/tools/image/remove-backgroundExtract clear PNG subject layers locally100% Local

To see all 40+ endpoints, refer to the full API Docs page.

LLM Tool Calling & Execution Examples

Here are concrete examples demonstrating how autonomous LLM agents invoke these tools under the hood:

Example 1: Playwright Browser Agent (Python)

An autonomous browser agent (such as a WebVoyager loop or a selenium/playwright agent) can run a local PDF merge by interacting directly with the DOM. Because processing is 100% client-side, the agent doesn't require API keys or backend tokens:

Python (Playwright script)
from playwright.sync_api import sync_playwright

def agent_merge_pdfs(file_paths):
    with sync_playwright() as p:
        # Launch headless browser and navigate to the tools path
        browser = p.chromium.launch(headless=True)
        page = browser.new_page()
        page.goto("https://yourownpdf.com/tools/pdf/merge-pdf")
        
        # Select the files and inject them into the local upload input element
        page.set_input_files("input[type='file']", file_paths)
        
        # Click the action button to merge pages locally in browser memory
        page.click("button:has-text('Merge PDF')")
        
        # Intercept and save the direct compiled file download
        with page.expect_download() as download_info:
            page.click("button:has-text('Download')")
        download = download_info.value
        download.save_as("output_merged_pdf.pdf")
        browser.close()

Example 2: Claude Desktop (MCP Settings invocation)

When a user requests file modifications: "Merge invoice_Jan.pdf and invoice_Feb.pdf together", the host LLM client routes the request to our local MCP tool calling server:

JSON (Tool Call & Result payload)
// 1. LLM requests local server execution
{
  "name": "merge_pdfs",
  "arguments": {
    "files": [
      "JVBERi0xLjQKJWRvY3VtZW50XzE...",
      "JVBERi0xLjQKJWRvY3VtZW50XzI..."
    ]
  }
}

// 2. Local MCP server response returned to the LLM (0 server roundtrips)
{
  "content": [
    {
      "type": "text",
      "text": "Merge operation successful. Integrated output contains 2 source files. File saved as output_merged_pdf.pdf."
    }
  ]
}