{"jsonrpc":"2.0","id":1,"result":{"tools":[{"name":"drive_write","description":"Write a markdown file to a workspace. Creates or updates the file with automatic versioning.","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace ID to write to"},"path":{"type":"string","description":"File path (e.g. \"notes/meeting.md\")"},"content":{"type":"string","description":"File content (markdown)"},"message":{"type":"string","description":"Optional version message"}},"required":["workspace_id","path","content"],"additionalProperties":false}},{"name":"drive_read","description":"Read a file's content from a workspace.","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace ID"},"file_id":{"type":"string","description":"File ID to read"}},"required":["workspace_id","file_id"],"additionalProperties":false}},{"name":"drive_list","description":"List files in a workspace, optionally filtered by path prefix.","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace ID"},"prefix":{"type":"string","description":"Path prefix filter (e.g. \"notes/\")"}},"required":["workspace_id"],"additionalProperties":false}},{"name":"drive_share","description":"Generate a share link for a workspace or specific file. Optionally email-gate the link so only a specific person can access it. Humans open this link to view, comment, or edit files.","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace ID"},"permission":{"type":"string","enum":["view","comment","edit"],"description":"Permission level for the share link"},"file_id":{"type":"string","description":"Scope to a specific file (optional)"},"expires_in":{"type":"number","description":"Expiry in seconds (optional)"},"max_uses":{"type":"number","description":"Maximum number of uses (optional)"},"email":{"type":"string","description":"Email-gate: only this email can access the link (requires email verification). Leave empty for public access."}},"required":["workspace_id","permission"],"additionalProperties":false}},{"name":"drive_comment","description":"Add a comment to a file.","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace ID"},"file_id":{"type":"string","description":"File ID to comment on"},"body":{"type":"string","description":"Comment text"},"line_start":{"type":"number","description":"Start line number (optional)"},"line_end":{"type":"number","description":"End line number (optional)"}},"required":["workspace_id","file_id","body"],"additionalProperties":false}},{"name":"drive_feedback","description":"Read human comments on a file. Use this to check if humans have left feedback.","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace ID"},"file_id":{"type":"string","description":"File ID to read comments from"}},"required":["workspace_id","file_id"],"additionalProperties":false}},{"name":"drive_activity","description":"Get recent activity in a workspace (file writes, comments, shares).","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace ID"}},"required":["workspace_id"],"additionalProperties":false}},{"name":"drive_invite","description":"Invite a human to your organization by email. They will receive a verification code to join.","inputSchema":{"type":"object","properties":{"email":{"type":"string","description":"Email address of the human to invite to your organization"},"role":{"type":"string","enum":["owner","admin","member"],"default":"member","description":"Role in the organization (default: member)"}},"required":["email"],"additionalProperties":false}},{"name":"drive_roles","description":"Manage per-workspace role delegation. Assign, list, or remove access for specific emails (view/comment/edit).","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace ID"},"action":{"type":"string","enum":["assign","list","remove"],"description":"Action: assign a role, list all roles, or remove a role"},"email":{"type":"string","description":"Email address (required for assign/remove)"},"permission":{"type":"string","enum":["view","comment","edit"],"description":"Permission level (required for assign)"}},"required":["workspace_id","action"],"additionalProperties":false}},{"name":"drive_org","description":"View your organization details: agents, members, plan, and usage.","inputSchema":{"type":"object","properties":{},"additionalProperties":false}},{"name":"drive_delete","description":"Delete a file from a workspace.","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace ID"},"file_id":{"type":"string","description":"File ID to delete"}},"required":["workspace_id","file_id"],"additionalProperties":false}},{"name":"drive_versions","description":"View version history for a file in a workspace.","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace ID"},"file_id":{"type":"string","description":"File ID"}},"required":["workspace_id","file_id"],"additionalProperties":false}},{"name":"drive_search","description":"Semantic search across your org's artifacts in AgentDrive. Returns the top-N most relevant files. Use this BEFORE writing similar artifacts to avoid duplication and surface prior context.","inputSchema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":2000,"description":"Search query"},"workspace_id":{"type":"string","description":"Scope to a single workspace; omit for org-wide search"},"top_k":{"type":"integer","exclusiveMinimum":0,"maximum":50,"description":"Max hits to return (default 10, max 50)"},"filter":{"type":"object","properties":{"agent_platform":{"type":"string","enum":["claude-code","codex","cursor","langgraph","crewai","autogen","hermes","openclaw","opencode","gemini-cli","unknown"]},"agent_id":{"type":"string"},"path_prefix":{"type":"string"}},"additionalProperties":false}},"required":["query"],"additionalProperties":false}},{"name":"drive_recall","description":"Recall persistent facts and preferences your agents have written. In v1 this returns semantic search results across artifacts; v1.5 will narrow to auto-extracted facts (preferences, decisions, key entities).","inputSchema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":2000,"description":"Recall query — what fact, preference, or decision are you trying to remember?"},"top_k":{"type":"integer","exclusiveMinimum":0,"maximum":20,"description":"Max results (default 5, max 20)"}},"required":["query"],"additionalProperties":false}},{"name":"drive_log_run","description":"Log an agent run to AgentDrive's provenance store. Captures task, status, referenced/produced artifacts, and cross-platform identity (which agent on which tool). Used for retrospective context retrieval and team-wide audit.","inputSchema":{"type":"object","properties":{"task":{"type":"string","minLength":1,"description":"What the agent did or is doing (free text)"},"status":{"type":"string","enum":["success","failure","partial","in_progress"],"description":"Run outcome (default success)"},"run_id":{"type":"string","description":"Existing run ID to update; omit to let server allocate"},"artifacts_referenced":{"type":"array","items":{"type":"string"},"description":"Paths of artifacts the run read"},"artifacts_produced":{"type":"array","items":{"type":"string"},"description":"Paths of artifacts the run wrote"},"duration_ms":{"type":"integer","minimum":0,"description":"Wall-clock duration in milliseconds"},"metadata":{"type":"object","additionalProperties":{},"description":"Free-form key/value metadata"}},"required":["task"],"additionalProperties":false}},{"name":"drive_context","description":"Auto-pull the most relevant artifacts from prior agent sessions for the task you are about to do. Combines semantic relevance with recency. Call this at the START of any non-trivial task to ground the agent in prior context — replaces manual copy-paste of artifacts between sessions.","inputSchema":{"type":"object","properties":{"task":{"type":"string","minLength":1,"maxLength":2000,"description":"What you are about to do — used to rank prior artifacts by relevance"},"workspace_id":{"type":"string","description":"Scope to a single workspace; omit for org-wide context"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":20,"description":"Max artifacts to return (default 5, max 20)"}},"required":["task"],"additionalProperties":false}},{"name":"drive_sessions","description":"List recent agent sessions for this project across harnesses (Claude Code, Codex, OpenCode, Gemini CLI, Cursor), newest first. Use to find prior work to continue.","inputSchema":{"type":"object","properties":{"project":{"type":"string","pattern":"^[a-z0-9._-]{1,200}$","description":"Project key; defaults to the project of the current working directory"},"platform":{"type":"string","description":"Only sessions from this harness (claude-code, codex, opencode, gemini-cli, cursor)"},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":50,"description":"Max sessions to return (default 10, max 50)"}},"additionalProperties":false}},{"name":"drive_resume","description":"Load a compact handoff brief (goal, files touched, recent turns) from a prior session, by default the latest one from a different harness, so you can continue that work.","inputSchema":{"type":"object","properties":{"session_id":{"type":"string","description":"Session run id from drive_sessions (e.g. codex:abc123); omit to pick the latest session from another harness"},"platform":{"type":"string","description":"When session_id is omitted, only consider sessions from this harness"},"max_chars":{"type":"integer","minimum":1000,"maximum":50000,"description":"Handoff size budget in characters (default 12000)"}},"additionalProperties":false}},{"name":"drive_sandbox_clone","description":"[EXPERIMENTAL] Clone a git repo into a per-workspace Linux sandbox. Requires Cloudflare Containers on the AgentDrive worker; gracefully degrades to a 503 with \"sandbox not configured\" otherwise.","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace to clone into. The sandbox persists across MCP sessions per workspace."},"url":{"type":"string","format":"uri","description":"Git repository URL to clone"},"branch":{"type":"string","description":"Branch to check out (default: repo default)"},"depth":{"type":"integer","exclusiveMinimum":0,"maximum":50,"description":"Shallow clone depth (default: full clone)"}},"required":["workspace_id","url"],"additionalProperties":false}},{"name":"drive_sandbox_exec","description":"[EXPERIMENTAL] Run a shell command inside the per-workspace Linux sandbox. Captures stdout/stderr (64 KB cap), exit code, duration. Requires Cloudflare Containers; degrades to 503 otherwise.","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace whose sandbox to run in"},"cmd":{"type":"string","minLength":1,"maxLength":2048,"description":"Shell command to run inside the per-workspace Linux sandbox"},"cwd":{"type":"string","description":"Working directory (default: workspace root)"},"timeout_ms":{"type":"integer","exclusiveMinimum":0,"maximum":60000,"description":"Max runtime in ms (default 30000, hard cap 60000)"}},"required":["workspace_id","cmd"],"additionalProperties":false}},{"name":"drive_sandbox_read","description":"[EXPERIMENTAL] Read a file from the per-workspace sandbox filesystem (build artifacts, test output, logs). Requires Cloudflare Containers; degrades to 503 otherwise.","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace whose sandbox to read from"},"path":{"type":"string","description":"Path inside the sandbox (e.g., src/index.ts or /tmp/build.log)"}},"required":["workspace_id","path"],"additionalProperties":false}},{"name":"drive_sandbox_commit","description":"[EXPERIMENTAL] Stage + commit the current sandbox worktree. Surfaces as an AgentDrive artifact at commits/<sha>.json. Requires Cloudflare Containers; degrades to 503 otherwise.","inputSchema":{"type":"object","properties":{"workspace_id":{"type":"string","description":"Workspace whose sandbox to commit"},"message":{"type":"string","minLength":1,"maxLength":500,"description":"Commit message"},"author_name":{"type":"string","description":"Override git author name (default: agent identity)"},"author_email":{"type":"string","format":"email","description":"Override git author email (default: agent identity)"}},"required":["workspace_id","message"],"additionalProperties":false}}]}}