Quad Harness
0.2.0Download

Docs Extend

Plugins

Add tools to the agent with process plugins in any language that speak JSON-RPC over standard input and output, or with simple script tools, with an example.

4 min read

There are three ways to give the agent new tools without changing the app:

Script tool Process plugin MCP server
What it is A folder with tool.json and an executable A long-running program that offers several tools A server that speaks the Model Context Protocol
Runs Once per call Stays running Stays running, or remote
Best for One small command, written in minutes A set of related tools in your own code Existing servers and hosted services
Feature switch Your own tools Plugins MCP servers
See Tools This page MCP servers

Process plugins

A plugin is a local program that adds tools. It can be written in any language that can read and write lines of JSON on standard input and output: Node, Python, Rust, a shell script.

Layout

<plugin folder>/
  plugin.json
  index.mjs

plugin.json:

{
  "id": "hello-quad",
  "name": "Hello Quad",
  "version": "0.1.0",
  "description": "Example plugin: echoes text and returns the current time.",
  "command": "/usr/bin/env",
  "args": ["node", "index.mjs"],
  "enabled": true
}

The command runs with the plugin’s folder as its working directory. If Node or Python is not on the app’s PATH, use an absolute path to the interpreter.

The protocol

The app sends JSON-RPC 2.0 requests, one per line, on the plugin’s standard input, and reads one answer per line from its standard output:

  1. initialize, with protocolVersion and clientInfo.
  2. notifications/initialized (no answer expected).
  3. tools/list. Answer {"tools": [{"name", "description", "inputSchema"}]}.
  4. tools/call with {"name", "arguments"}. Answer {"content": [{"type": "text", "text": "..."}], "isError": false}.

Write anything else (logs, debug output) to standard error, never standard output.

A complete example

index.mjs:

import readline from 'node:readline';

const rl = readline.createInterface({ input: process.stdin, crlfDelay: Infinity });
const send = (message) => process.stdout.write(JSON.stringify(message) + '\n');

rl.on('line', (line) => {
  let request;
  try { request = JSON.parse(line); } catch { return; }
  if (request.id === undefined) return; // a notification: no answer
  const ok = (result) => send({ jsonrpc: '2.0', id: request.id, result });

  if (request.method === 'initialize') {
    return ok({ protocolVersion: '0.1', name: 'Hello Quad', version: '0.1.0', capabilities: { tools: {} } });
  }
  if (request.method === 'tools/list') {
    return ok({ tools: [
      { name: 'echo', description: 'Echo text back',
        inputSchema: { type: 'object', properties: { text: { type: 'string' } }, required: ['text'] } },
      { name: 'time', description: 'Return the current ISO time',
        inputSchema: { type: 'object', properties: {} } }
    ] });
  }
  if (request.method === 'tools/call') {
    const { name, arguments: args = {} } = request.params;
    if (name === 'echo') return ok({ content: [{ type: 'text', text: `echo: ${args.text ?? ''}` }] });
    if (name === 'time') return ok({ content: [{ type: 'text', text: new Date().toISOString() }] });
    return send({ jsonrpc: '2.0', id: request.id, error: { message: `unknown tool ${name}` } });
  }
  send({ jsonrpc: '2.0', id: request.id, error: { message: `unknown method ${request.method}` } });
});

The quickest way to get this example: Settings → Tools and connections → Plugins → Create example plugin.

How the agent sees plugin tools

  • Tools are named plugin__<id>__<tool>, for example plugin__hello-quad__echo.
  • They count as changes, so they ask in Standard mode and are blocked in Plan mode.
  • A result is cut at 120,000 characters.
  • A request that takes more than 30 seconds times out.

Installing a plugin

From a project (no install step)

Put the plugin under the project:

<workspace>/.quad/plugins/<id>/
  plugin.json
  index.mjs

Quad Harness watches that folder. It installs the plugin into its own plugin folder, connects it and enables it automatically. If you remove the folder from the project, the installed copy is removed on the next sync. A plugin folder directly under <workspace>/plugins/ is picked up the same way.

This is also how the agent builds plugins for you: ask it to write one under .quad/plugins/.

Write a plugin under .quad/plugins/jira-lite with a tool that lists my open issues from the Jira REST API, reading the token from the JIRA_TOKEN environment variable.

From any folder

For a plugin that lives outside a project, open Settings → Tools and connections → Plugins, choose Add plugin and give the folder’s path.

Managing plugins

Settings → Tools and connections → Plugins lists Installed plugins:

  • A switch per plugin. Switching one off unloads its tools without deleting its folder. Switch it back on to reconnect.
  • Remove plugin removes the installed copy.
  • Reload plugins restarts them all, for example after you edit one.

The Plugin Hub window (key P, or the + at the end of the dock) shows everything that plugs into the app (windows, tools, skills, connectors and plugins) and has a Bring your own section to add an MCP server, a plugin from a folder, or to describe a plugin for Quad to write. A plugin Quad writes this way stays switched off until you say so.

Warning. Plugins run as your user account, with your permissions. Only install plugins you trust, and read what a plugin does before you switch it on.

Scope of the plugin API

This is version 1 of the plugin interface: plugins add tools. They cannot yet add windows, hooks or settings pages.

If you switch Plugins off in Settings → Features, every plugin is disconnected at once and the page leaves Settings.