Skip to main content
Use this catalog for Memex request shapes. Agents should fetch this page before the first Memex request in a new session and again whenever a request fails because of an unknown field, tool name, or argument shape.

Surface map

Preferred base URL: https://memex.garden/api

Core operations

Search saved content

  • REST route: POST https://memex.garden/api/search
  • Also accepted: POST https://memex.garden/api/search-content
  • MCP tool: search_content
  • Auth: Authentication
  • Response contract: Response shape

Parameters

Search behavior

  • raw defaults to false, which returns the compact, token-efficient response shape with consistent top-level type, url, createdAt, title?, text, and optional slim media.
  • Set raw: true to receive the original machine-readable response with results, extraEntities, referencesByResultId, referencedEntities, and referencedTags.
  • If your client exposes response options named llm and full, use llm when you want the default compact response (raw: false or omitted), and use full when you want the machine-readable response (raw: true).
  • Search responses include direct references for annotation and chat-thread results by default.
  • Search result entities include a resolved url whenever Memex can derive a stable source URL. Prefer that field for citations and references.
  • includeTags adds related tag entities and tag IDs to referencesByResultId.
  • In raw: true, includeNotes adds an annotations array on each matched result. Each note includes compiled text, resolvedReferences, and a references field. That references field contains the note’s direct reference entities, and if one of those direct references is itself an annotation, that nested annotation includes its own references one level deeper.
  • In raw: false, includeNotes adds user_notes on each compact result in the results array. Each note is precompiled into YAML text with its own compact references object.
  • Raw annotation and chat-thread references are resolved from both reference_content_ids and memex-reference nodes found inside annotation JSON content or chat-thread message JSON content.
  • Search responses report charges directly in USD micros through usageMicrosCharged and the remaining dollar-denominated balance through remainingUsageBalance.
  • Compact raw=false requests default reranking on when the query is eligible for rerank. Raw raw=true requests default reranking off unless you explicitly pass enableRerank: true.
  • Search requests currently report usageMicrosCharged: 0.
  • Unsupported contentTypes values are rejected with an error that includes the supported values.
  • Omitting both feedIds and feedScope searches the full library, not only feed-sourced content.

LLM vs full response options

Use the same search route for both response modes:
  • llm response: omit raw or set "raw": false. This is the default and is best for agent prompts, summaries, and direct LLM context because results are compact and normalized.
  • full response: set "raw": true. This is best for programmatic processing because it preserves the full result graph, including extraEntities, referencesByResultId, referencedEntities, and referencedTags.
Search inside a view with the LLM-ready response:
Search inside a view with the full response:
Use POST /list-feeds or MCP list_subscribed_feeds to fetch feed IDs first. Search one feed:
Search multiple specific feeds:
Search all subscribed feeds:
Include archived feed entries as well:

Available contentTypes values

These are the exact persisted content_entity.type values accepted by POST /search, POST /search-content, and the MCP search_content tool: web, pdf, youtube, twitter, instagram, tiktok, facebook, linkedin, pinterest, reddit, chatgpt, claude, annotation, image, transcribedMedia, audioRecording, selector, chatThread, twitterProfile, subreddit, youtubeChannel Example:

Save content or a public URL

  • REST route: POST https://memex.garden/api/save-content-entity
  • URL-only REST route: POST https://memex.garden/api/save-content-by-url
  • MCP tool: save_content_by_url
  • Auth: Authentication
  • Response contract: Response shape

Parameters

URL-save payload:
URL-only payload: Behavior notes:
  • Tag names are trimmed and deduplicated.
  • For normal web URLs without html, Memex fetches the page body itself.
  • Pass data.url for structured saves, or url for URL-only saves.
  • REST route: POST https://memex.garden/api/ensure-shared-library-entry-link
  • MCP tool: create_sharing_link
  • Auth: Authentication
  • Response contract: Response shape
MCP payload: REST payload: MCP example:
MCP response includes:
  • shareUrl: full Memex URL for the public share link
  • publicToken: underlying public invite token
  • access: requested API access value, either view or collaborate
  • accessMode: stored Memex access mode
  • REST route: POST https://memex.garden/api/list-shared-library-entry-links
  • MCP tool: list_sharing_links
  • Auth: Authentication
  • Response contract: Response shape
MCP payload: REST payload: MCP example:
MCP response:

View endpoints

Views are saved search scopes. Use them to define a reusable subset of a Memex library, list the caller’s accessible scopes, then run search constrained to one view.

POST /create-view

  • Full URL: https://memex.garden/api/create-view
  • Auth: authenticated user
  • Used for: creating a saved view owned by the caller
scope.expression can be one of: Example:
Response notes:
  • Returns view.
  • view.id is the value to pass as viewId to /execute-view-search.
  • defaults.sortBy applies when a view search request omits sortBy.
  • defaults.includeNotes controls whether scoped search returns attached notes.

POST /list-views

  • Full URL: https://memex.garden/api/list-views
  • Auth: authenticated user
  • Used for: listing views the caller owns or can access through sharing
Request body:
Response notes:
  • Returns views: ViewListItem[].
  • Each view includes id, title, description, scope, createdAt, updatedAt, and accessRole.
  • accessRole is owner, viewer, or writer.
  • Returns tagEntities for tag IDs referenced by the listed view scopes.

POST /execute-view-search

  • Full URL: https://memex.garden/api/execute-view-search
  • Auth: authenticated user for viewId, or no auth when using a public shared view token
  • Used for: searching only inside the content matched by a saved view
  • Response contract: the full/raw /search response shape from Response shape
POST /execute-view-search always returns the full response shape. If you want the LLM-ready compact response for a private view, call POST /search with viewIds: ["view_id"] and omit raw or set raw: false. Use raw: true for the full response.
Authenticated view example:
Public token example:
Behavior notes:
  • The search is first constrained to content matched by the view’s saved expression.
  • tagIds, contentTypes, and timeRange only narrow the view result set further.
  • If the scoped view contains no matching content, the response uses the raw search shape with an empty results array.

Content endpoints

POST /get-available-tag-names

  • Full URL: https://memex.garden/api/get-available-tag-names
  • Auth: authenticated user
  • Used for: fetching the caller’s available tag names for autocomplete, filtering, or agent prompts
Request body:
Response notes:
  • Returns tagNames: string[].
  • Names are deduplicated case-insensitively and sorted alphabetically.
  • Includes ordinary tags and any user-available special tags.
MCP clients can use the same canonical operation through execute_action:
The completed action output includes both full tags and the compatibility tagNames list. Pass input.query to filter case-insensitively or input.limit to request a bounded result set.

POST /list-auto-tagging-rules

  • Full URL: https://memex.garden/api/list-auto-tagging-rules
  • Auth: authenticated user
  • Used for: reading the caller’s auto-tagging rule configuration
Request body:
Response notes:
  • Returns rules, an array of auto-tagging rules.
  • Rule fields include id, tag_id, add_tag_ids, enabled, source flags, text_queries, ai_prompt, content_types, feed_ids, and condition_expression.

POST /create-auto-tagging-rule

  • Full URL: https://memex.garden/api/create-auto-tagging-rule
  • Auth: authenticated user
  • Used for: creating an auto-tagging rule for one or more existing tag IDs
Request body:
Response notes:
  • Returns ruleId.
  • Provide tag_id or at least one add_tag_ids value.
  • If omitted, enabled defaults to false.

POST /list-feeds

  • Full URL: https://memex.garden/api/list-feeds
  • Auth: authenticated user
  • Used for: listing the caller’s subscribed RSS and YouTube feeds
Request body:
Response notes:
  • Returns feeds: FeedListItem[].
  • Feed items include IDs, source URLs, display metadata, read-state timestamps, visibility, status, and initial import progress when present.
  • Only subscriptions owned by the authenticated user are returned.

POST /list-handoffs

  • Full URL: https://memex.garden/api/list-handoffs
  • MCP tool: list_handoffs
  • Auth: authenticated user
  • Used for: listing handoffs across statuses, readiness states, or time frames
If status and readyOnly are omitted, this endpoint returns handoffs across every status and approval state. Use status: "pending" for a normal poll that excludes previously processed handoffs while still showing both approved and unapproved items. Pending handoffs:
Handoffs created in a time frame:
Response notes:
  • Returns handoffs: Handoff[].
  • Handoffs are operational queue records, not content entities.
  • This endpoint does not mark handoffs as processed.

Account and billing helper endpoints

POST /agent-create-user

  • Full URL: https://memex.garden/api/agent-create-user
  • Auth: x-agent-service-token
  • Used for: agent-assisted signup on behalf of a human

POST /get-available-plans

  • Full URL: https://memex.garden/api/get-available-plans
  • Auth: none
  • Used for: fetching the live pricing catalog before checkout
Request body:

POST /checkout

  • Full URL: https://memex.garden/api/checkout
  • Auth: X-Api-Key: <apiKey> or an accepted Memex bearer token
  • Used for: buying one-time credit plans from an agent runtime
Use /checkout for one-time plans. For subscription plans, send the user to https://memex.garden/pricing.

MCP protocol request shape

MCP requests go to: https://memex.garden/api/mcp

List tools

Call a tool