API Overview
Intertool REST and MCP endpoints.
The Fastify service defaults to http://localhost:3001. REST endpoints return JSON with errors shaped as { "error": { "code", "message" } }. Validation errors also include field-level details.
Health and identity
GET /health
GET /api/me
GET /api/organizations/current
GET /api/members
POST /api/organizations
GET /api/dashboardRepositories and tokens
GET /api/repositories
POST /api/repositories
PATCH /api/repositories/:id
DELETE /api/repositories/:id
GET /api/tokens
POST /api/tokens
DELETE /api/tokens/:idToken plaintext is returned only by POST /api/tokens. List responses contain metadata and the safe prefix only.
POST /api/repositories accepts full_name as either owner/repository or a full HTTPS GitHub repository URL and normalizes it to owner/repository. Non-GitHub and nested GitHub URLs are rejected with field-level validation details.
Memories
GET /api/memories
POST /api/memories
GET /api/memories/:id
PATCH /api/memories/:id
POST /api/memories/:id/publish
POST /api/memories/:id/dispute
POST /api/memories/:id/archive
POST /api/memories/:id/reports
POST /api/memories/:id/reports/:reportId/resolve
POST /api/context/search
POST /api/context/getGET /api/memories supports stable cursor pagination plus query, repository, type, status, and confidence filters.
Personal memory
GET /api/personal-memories
GET /api/personal-memories/stats
GET /api/personal-memories/:id
POST /api/personal-memories/importThese endpoints are scoped to the authenticated user, not the current organisation. POST /api/personal-memories/import upserts one source document by source_kind and source_key; the server computes its content checksum. The list endpoint supports cursor pagination plus query and source_kind filters and returns a short content preview. The stats endpoint returns totals by source and by the first folder in each source key so the dashboard can show an honest collection distribution without inferring semantic relationships. Personal memory never participates in the team context endpoints or team MCP retrieval. Private agent captures have a separate user scoped recall_memory tool.
MCP
POST /mcp implements Streamable HTTP and requires Authorization: Bearer itk_.... It exposes exactly:
capture_memoryrecall_memoryget_contextsearch_contextpropose_memorypublish_memoryreport_stale
Missing, invalid, expired, and revoked tokens return 401. Unknown cross-tenant objects return the same 404 as absent objects. Validation errors and tool failures never include server stack traces.
capture_memory saves a concise learning and evidence reference privately for the authenticated user. Identical submissions reuse the same memory. recall_memory searches only that user’s agent captures within the requested repository and returns at most five results. Neither tool publishes team memory. Connection instructions request automatic capture after verified work, subject to client support and permissions.
Agent lifecycle adapter
POST /api/agent/context accepts { "repository": "owner/name" } and returns a bounded team overview plus up to three recent private captures belonging to the authenticated user. This endpoint does not accept a raw prompt or transcript. Private data remains separate from the team context fields.
POST /api/agent/capture accepts the same repository, title, content and evidence fields as capture_memory. It returns { "saved": true, "memory_id": "...", "visibility": "private" } after persistence. Identical submissions return the same memory. Validation and detected secrets return 400; rate limits return 429. Both endpoints require authentication and allow up to 60 requests per minute per user for each endpoint.