Letta MCP Servers API

Register external Model Context Protocol servers and expose their tools to agents.

Operations 10

POST /v1/mcp-servers/ Create MCP Server #
GET /v1/mcp-servers/ List MCP Servers #
GET /v1/mcp-servers/{mcp_server_id} Retrieve MCP Server #
DELETE /v1/mcp-servers/{mcp_server_id} Delete MCP Server #
PATCH /v1/mcp-servers/{mcp_server_id} Update MCP Server #
GET /v1/mcp-servers/{mcp_server_id}/tools List Tools for MCP Server #
GET /v1/mcp-servers/{mcp_server_id}/tools/{tool_id} Retrieve MCP Tool #
POST /v1/mcp-servers/{mcp_server_id}/tools/{tool_id}/run Run MCP Tool #
PATCH /v1/mcp-servers/{mcp_server_id}/refresh Refresh MCP Server Tools #
GET /v1/mcp-servers/connect/{mcp_server_id} Connect MCP Server #

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-agent-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-block-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-tool-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-source-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-run-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-group-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-identity-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-message-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-passage-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-archive-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-job-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-llm-config-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-embedding-config-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/json-schema/letta-provider-schema.json

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/letta-mcp-servers-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

letta-mcp-servers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Letta Admin MCP Servers API
  version: 1.0.0
  description: REST API for Letta, the stateful agents platform. Manage agents, memory blocks, archival passages, sources, custom tools, MCP servers, multi-agent groups, runs, and streaming responses. Available as Letta Cloud (managed) at https://api.letta.com/v1 and as the self-hosted open-source server (Apache-2.0) typically run at http://localhost:8283.
  contact:
    name: Letta
    url: https://www.letta.com/
    email: support@letta.com
  license:
    name: Apache-2.0
    url: https://github.com/letta-ai/letta/blob/main/LICENSE
  x-logo:
    url: https://www.letta.com/favicon.ico
servers:
- url: https://api.letta.com
  description: Letta Cloud (managed)
- url: https://app.letta.com
  description: Letta Cloud (app)
- url: http://localhost:8283
  description: Self-hosted Letta server
security:
- bearerAuth: []
tags:
- name: MCP Servers
  description: Register external Model Context Protocol servers and expose their tools to agents.
paths:
  /v1/mcp-servers/:
    post:
      tags:
      - MCP Servers
      summary: Create MCP Server
      description: Add a new MCP server to the Letta MCP server config
      operationId: mcp_create_mcp_server
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMCPServerRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/StdioMCPServer'
                - $ref: '#/components/schemas/SSEMCPServer'
                - $ref: '#/components/schemas/StreamableHTTPMCPServer'
                title: Response Mcp Create Mcp Server
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - MCP Servers
      summary: List MCP Servers
      description: Get a list of all configured MCP servers
      operationId: mcp_list_mcp_servers
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  anyOf:
                  - $ref: '#/components/schemas/StdioMCPServer'
                  - $ref: '#/components/schemas/SSEMCPServer'
                  - $ref: '#/components/schemas/StreamableHTTPMCPServer'
                title: Response Mcp List Mcp Servers
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/mcp-servers/{mcp_server_id}:
    get:
      tags:
      - MCP Servers
      summary: Retrieve MCP Server
      description: Get a specific MCP server
      operationId: mcp_retrieve_mcp_server
      parameters:
      - name: mcp_server_id
        in: path
        required: true
        schema:
          type: string
          title: Mcp Server Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/StdioMCPServer'
                - $ref: '#/components/schemas/SSEMCPServer'
                - $ref: '#/components/schemas/StreamableHTTPMCPServer'
                title: Response Mcp Retrieve Mcp Server
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - MCP Servers
      summary: Delete MCP Server
      description: Delete an MCP server by its ID
      operationId: mcp_delete_mcp_server
      parameters:
      - name: mcp_server_id
        in: path
        required: true
        schema:
          type: string
          title: Mcp Server Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - MCP Servers
      summary: Update MCP Server
      description: Update an existing MCP server configuration
      operationId: mcp_update_mcp_server
      parameters:
      - name: mcp_server_id
        in: path
        required: true
        schema:
          type: string
          title: Mcp Server Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMCPServerRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/StdioMCPServer'
                - $ref: '#/components/schemas/SSEMCPServer'
                - $ref: '#/components/schemas/StreamableHTTPMCPServer'
                title: Response Mcp Update Mcp Server
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/mcp-servers/{mcp_server_id}/tools:
    get:
      tags:
      - MCP Servers
      summary: List Tools for MCP Server
      description: Get a list of all tools for a specific MCP server
      operationId: mcp_list_tools_for_mcp_server
      parameters:
      - name: mcp_server_id
        in: path
        required: true
        schema:
          type: string
          title: Mcp Server Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tool'
                title: Response Mcp List Tools For Mcp Server
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/mcp-servers/{mcp_server_id}/tools/{tool_id}:
    get:
      tags:
      - MCP Servers
      summary: Retrieve MCP Tool
      description: Get a specific MCP tool by its ID
      operationId: mcp_retrieve_mcp_tool
      parameters:
      - name: mcp_server_id
        in: path
        required: true
        schema:
          type: string
          title: Mcp Server Id
      - name: tool_id
        in: path
        required: true
        schema:
          type: string
          title: Tool Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tool'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/mcp-servers/{mcp_server_id}/tools/{tool_id}/run:
    post:
      tags:
      - MCP Servers
      summary: Run MCP Tool
      description: 'Execute a specific MCP tool


        The request body should contain the tool arguments in the ToolExecuteRequest format.'
      operationId: mcp_run_tool
      parameters:
      - name: mcp_server_id
        in: path
        required: true
        schema:
          type: string
          title: Mcp Server Id
      - name: tool_id
        in: path
        required: true
        schema:
          type: string
          title: Tool Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/letta__schemas__mcp_server__ToolExecuteRequest'
              default:
                args: {}
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolExecutionResult'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/mcp-servers/{mcp_server_id}/refresh:
    patch:
      tags:
      - MCP Servers
      summary: Refresh MCP Server Tools
      description: 'Refresh tools for an MCP server by:

        1. Fetching current tools from the MCP server

        2. Deleting tools that no longer exist on the server

        3. Updating schemas for existing tools

        4. Adding new tools from the server


        Returns a summary of changes made.'
      operationId: mcp_refresh_mcp_server_tools
      parameters:
      - name: mcp_server_id
        in: path
        required: true
        schema:
          type: string
          title: Mcp Server Id
      - name: agent_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Agent Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/mcp-servers/connect/{mcp_server_id}:
    get:
      tags:
      - MCP Servers
      summary: Connect MCP Server
      description: 'Connect to an MCP server with support for OAuth via SSE.

        Returns a stream of events handling authorization state and exchange if OAuth is required.'
      operationId: mcp_connect_mcp_server
      parameters:
      - name: mcp_server_id
        in: path
        required: true
        schema:
          type: string
          title: Mcp Server Id
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema: {}
            text/event-stream:
              description: Server-Sent Events stream
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ZAIThinking:
      properties:
        type:
          type: string
          enum:
          - enabled
          - disabled
          title: Type
          description: Whether thinking is enabled or disabled.
          default: enabled
        clear_thinking:
          type: boolean
          title: Clear Thinking
          description: If False, preserved thinking is used (recommended for agents).
          default: false
      type: object
      title: ZAIThinking
      description: Thinking configuration for ZAI GLM-4.5+ models.
    FileBlock:
      properties:
        value:
          type: string
          title: Value
          description: Value of the block.
        limit:
          type: integer
          title: Limit
          description: Character limit of the block.
          default: 100000
        project_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Project Id
          description: The associated project id.
        template_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Template Name
          description: Name of the block if it is a template.
        is_template:
          type: boolean
          title: Is Template
          description: Whether the block is a template (e.g. saved human/persona options).
          default: false
        template_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Template Id
          description: The id of the template.
        base_template_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Base Template Id
          description: The base template id of the block.
        deployment_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Deployment Id
          description: The id of the deployment.
        entity_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Entity Id
          description: The id of the entity within the template.
        preserve_on_migration:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Preserve On Migration
          description: Preserve the block on template migration.
          default: false
        label:
          anyOf:
          - type: string
          - type: 'null'
          title: Label
          description: Label of the block (e.g. 'human', 'persona') in the context window.
        read_only:
          type: boolean
          title: Read Only
          description: Whether the agent has read-only access to the block.
          default: false
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: Description of the block.
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Metadata
          description: Metadata of the block.
          default: {}
        hidden:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Hidden
          description: If set to True, the block will be hidden.
        id:
          type: string
          pattern: ^block-[a-fA-F0-9]{8}
          title: Id
          description: The human-friendly ID of the Block
          examples:
          - block-123e4567-e89b-12d3-a456-426614174000
        created_by_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Created By Id
          description: The id of the user that made this Block.
        last_updated_by_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Updated By Id
          description: The id of the user that last updated this Block.
        tags:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Tags
          description: The tags associated with the block.
          default: []
        file_id:
          type: string
          title: File Id
          description: Unique identifier of the file.
        source_id:
          type: string
          title: Source Id
          description: 'Deprecated: Use `folder_id` field instead. Unique identifier of the source.'
          deprecated: true
        is_open:
          type: boolean
          title: Is Open
          description: True if the agent currently has the file open.
        last_accessed_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Accessed At
          description: UTC timestamp of the agent’s most recent access to this file. Any operations from the open, close, or search tools will update this field.
      type: object
      required:
      - value
      - file_id
      - source_id
      - is_open
      title: FileBlock
    StreamableHTTPMCPServer:
      properties:
        mcp_server_type:
          type: string
          const: streamable_http
          title: Mcp Server Type
          default: streamable_http
        server_url:
          type: string
          title: Server Url
          description: The URL of the server
        auth_header:
          anyOf:
          - type: string
          - type: 'null'
          title: Auth Header
          description: The name of the authentication header (e.g., 'Authorization')
        auth_token:
          anyOf:
          - type: string
          - type: 'null'
          title: Auth Token
          description: The authentication token or API key value
        custom_headers:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Custom Headers
          description: Custom HTTP headers to include with requests
        id:
          type: string
          pattern: ^mcp_server-[a-fA-F0-9]{8}
          title: Id
          description: The human-friendly ID of the Mcp_server
          examples:
          - mcp_server-123e4567-e89b-12d3-a456-426614174000
        server_name:
          type: string
          title: Server Name
          description: The name of the MCP server
      additionalProperties: false
      type: object
      required:
      - server_url
      - server_name
      title: StreamableHTTPMCPServer
      description: A Streamable HTTP MCP server
    UpdateMCPServerRequest:
      properties:
        server_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Server Name
          description: The name of the MCP server
        config:
          oneOf:
          - $ref: '#/components/schemas/letta__schemas__mcp_server__UpdateStdioMCPServer'
          - $ref: '#/components/schemas/letta__schemas__mcp_server__UpdateSSEMCPServer'
          - $ref: '#/components/schemas/letta__schemas__mcp_server__UpdateStreamableHTTPMCPServer'
          title: Config
          description: The MCP server configuration updates (Stdio, SSE, or Streamable HTTP)
          discriminator:
            propertyName: mcp_server_type
            mapping:
              sse: '#/components/schemas/letta__schemas__mcp_server__UpdateSSEMCPServer'
              stdio: '#/components/schemas/letta__schemas__mcp_server__UpdateStdioMCPServer'
              streamable_http: '#/components/schemas/letta__schemas__mcp_server__UpdateStreamableHTTPMCPServer'
      additionalProperties: false
      type: object
      required:
      - config
      title: UpdateMCPServerRequest
      description: Request to update an existing MCP server configuration.
    letta__schemas__mcp_server__UpdateStdioMCPServer:
      properties:
        mcp_server_type:
          type: string
          const: stdio
          title: Mcp Server Type
          default: stdio
        command:
          anyOf:
          - type: string
          - type: 'null'
          title: Command
          description: The command to run (MCP 'local' client will run this command)
        args:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Args
          description: The arguments to pass to the command
        env:
          anyOf:
          - additionalProperties:
              type: string
            type: object
          - type: 'null'
          title: Env
          description: Environment variables to set
      additionalProperties: false
      type: object
      required:
      - command
      - args
      title: UpdateStdioMCPServer
      description: Update schema for Stdio MCP server - all fields optional
    AgentState:
      properties:
        created_by_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Created By Id
          description: The id of the user that made this object.
        last_updated_by_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Updated By Id
          description: The id of the user that made this object.
        created_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created At
          description: The timestamp when the object was created.
        updated_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated At
          description: The timestamp when the object was last updated.
        id:
          type: string
          title: Id
          description: The id of the agent. Assigned by the database.
        name:
          type: string
          title: Name
          description: The name of the agent.
        tool_rules:
          anyOf:
          - items:
              oneOf:
              - $ref: '#/components/schemas/ChildToolRule'
              - $ref: '#/components/schemas/InitToolRule'
              - $ref: '#/components/schemas/TerminalToolRule'
              - $ref: '#/components/schemas/ConditionalToolRule'
              - $ref: '#/components/schemas/ContinueToolRule'
              - $ref: '#/components/schemas/RequiredBeforeExitToolRule'
              - $ref: '#/components/schemas/MaxCountPerStepToolRule'
              - $ref: '#/components/schemas/ParentToolRule'
              - $ref: '#/components/schemas/RequiresApprovalToolRule'
              discriminator:
                propertyName: type
                mapping:
                  conditional: '#/components/schemas/ConditionalToolRule'
                  constrain_child_tools: '#/components/schemas/ChildToolRule'
                  continue_loop: '#/components/schemas/ContinueToolRule'
                  exit_loop: '#/components/schemas/TerminalToolRule'
                  max_count_per_step: '#/components/schemas/MaxCountPerStepToolRule'
                  parent_last_tool: '#/components/schemas/ParentToolRule'
                  required_before_exit: '#/components/schemas/RequiredBeforeExitToolRule'
                  requires_approval: '#/components/schemas/RequiresApprovalToolRule'
                  run_first: '#/components/schemas/InitToolRule'
            type: array
          - type: 'null'
          title: Tool Rules
          description: The list of tool rules.
        message_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Message Ids
          description: The ids of the messages in the agent's in-context memory.
        system:
          type: string
          title: System
          description: The system prompt used by the agent.
        agent_type:
          $ref: '#/components/schemas/AgentType'
          description: The type of agent.
        llm_config:
          $ref: '#/components/schemas/LLMConfig'
          description: 'Deprecated: Use `model` field instead. The LLM configuration used by the agent.'
          deprecated: true
        embedding_config:
          anyOf:
          - $ref: '#/components/schemas/EmbeddingConfig'
          - type: 'null'
          description: 'Deprecated: Use `embedding` field instead. The embedding configuration used by the agent.'
          deprecated: true
        model:
          anyOf:
          - type: string
          - type: 'null'
          title: Model
          description: 'The model handle used by the agent (format: provider/model-name).'
        embedding:
          anyOf:
          - type: string
          - type: 'null'
          title: Embedding
          description: 'The embedding model handle used by the agent (format: provider/model-name).'
        model_settings:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/OpenAIModelSettings'
            - $ref: '#/components/schemas/SGLangModelSettings'
            - $ref: '#/components/schemas/AnthropicModelSettings'
            - $ref: '#/components/schemas/GoogleAIModelSettings'
            - $ref: '#/components/schemas/GoogleVertexModelSettings'
            - $ref: '#/components/schemas/AzureModelSettings'
            - $ref: '#/components/schemas/XAIModelSettings'
            - $ref: '#/components/schemas/ZAIModelSettings'
            - $ref: '#/components/schemas/GroqModelSettings'
            - $ref: '#/components/schemas/DeepseekModelSettings'
            - $ref: '#/components/schemas/TogetherModelSettings'
            - $ref: '#/components/schemas/BedrockModelSettings'
            - $ref: '#/components/schemas/BasetenModelSettings'
            - $ref: '#/components/schemas/OpenRouterModelSettings'
            - $ref: '#/components/schemas/ChatGPTOAuthModelSettings'
            discriminator:
              propertyName: provider_type
              mapping:
                anthropic: '#/components/schemas/AnthropicModelSettings'
                azure: '#/components/schemas/AzureModelSettings'
                baseten: '#/components/schemas/BasetenModelSettings'
                bedrock: '#/components/schemas/BedrockModelSettings'
                chatgpt_oauth: '#/components/schemas/ChatGPTOAuthModelSettings'
                deepseek: '#/components/schemas/DeepseekModelSettings'
                google_ai: '#/components/schemas/GoogleAIModelSettings'
                google_vertex: '#/components/schemas/GoogleVertexModelSettings'
                groq: '#/components/schemas/GroqModelSettings'
                openai: '#/components/schemas/OpenAIModelSettings'
                openrouter: '#/components/schemas/OpenRouterModelSettings'
                sglang: '#/components/schemas/SGLangModelSettings'
                together: '#/components/schemas/TogetherModelSettings'
                xai: '#/components/schemas/XAIModelSettings'
                zai: '#/components/schemas/ZAIModelSettings'
          - type: 'null'
          title: Model Settings
          description: The model settings used by the agent.
        compaction_settings:
          anyOf:
          - $ref: '#/components/schemas/CompactionSettings-Output'
          - type: 'null'
          description: The compaction settings configuration used for compaction.
        response_format:
          anyOf:
          - oneOf:
            - $ref: '#/components/schemas/TextResponseFormat'
            - $ref: '#/components/schemas/JsonSchemaResponseFormat'
            - $ref: '#/components/schemas/JsonObjectResponseFormat'
            discriminator:
              propertyName: type
              mapping:
                json_object: '#/components/schemas/JsonObjectResponseFormat'
                json_schema: '#/components/schemas/JsonSchemaResponseFormat'
                text: '#/components/schemas/TextResponseFormat'
          - type: 'null'
          title: Response Format
          description: The response format used by the agent
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
          description: The description of the agent.
        metadata:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Metadata
          description: The metadata of the agent.
        memory:
          $ref: '#/components/schemas/Memory'
          description: 'Deprecated: Use `blocks` field instead. The in-context memory of the agent.'
          deprecated: true
        blocks:
          items:
            $ref: '#/components/schemas/Block'
          type: array
          title: Blocks
          description: The memory blocks used by the agent.
        tools:
          items:
            $ref: '#/components/schemas/Tool'
          type: array
          title: Tools
          description: The tools used by the agent.
        sources:
          items:
            $ref: '#/components/schemas/Source'
          type: array
          title: Sources
          description: 'Deprecated: Use `folders` field instead. The sources used by the agent.'
          deprecated: true
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: The tags associated with the agent.
        tool_exec_environment_variables:
          items:
            $ref: '#/components/schemas/AgentEnvironmentVariable'
          type: array
          title: Tool Exec Environment Variables
          description: 'Deprecated: use `secrets` field instead.'
          deprecated: true
        secrets:
          items:
            $ref: '#/components/schemas/AgentEnvironmentVariable'
          type: array
          title: Secrets
          description: The environment variables for tool execution specific to this agent.
        project_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Project Id
          description: The id of the project the agent belongs to.
        template_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Template Id
          description: The id of the template the agent belongs to.
        base_template_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Base Template Id
          description: The base template id of the agent.
        deployment_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Deployment Id
          description: The id of the deployment.
        entity_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Entity Id
          description: The id of the entity within the template.
        identity_ids:
          items:
            type: string
          type: array
          title: Identity Ids
          description: 'Deprecated: Use `identities` field instead. The ids of the identities associated with this agent.'
          default: []
          deprecated: true
        identities:
          items:
            $ref: '#/components/schemas/Identity'
          type: array
          title: Identities
          description: The identities associated with this agent.
          default: []
        pending_approval:
          anyOf:
          - $ref: '#/components/schemas/ApprovalRequestMessage'
          - type: 'null'
          description: The latest approval request message pending for this agent, if any.
        message_buffer_autoclear:
          type: boolean
          title: Message Buffer Autoclear
          description: If set to True, the agent will not remember previous messages (though the agent will still retain state via core memory blocks and archival/recall memory). Not recommended unless you have an advanced use case.
          default: false
        enable_sleeptime:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enable Sleeptime
          description: If set to True, memory management will move to a background agent thread.
        multi_agent_group:
          anyOf:
          - $ref: '#/components/schemas/Group'
          - type: 'null'
          description: 'Deprecated: Use `managed_group` field instead. The multi-agent group that this agent manages.'
          deprecated: true
        managed_group:
          anyOf:
          - $ref: '#/components/schemas/Group'
          - type: 'null'
          description: The multi-agent group that this agent manages
        last_run_completion:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Run Completion
          description: The timestamp when the agent last completed a run.
        last_run_duration_ms:
          anyOf:
          - type: integer
          - type: 'null'
          title: Last Run Duration Ms
          description: The duration in milliseconds of the agent's last run.
        last_stop_reason:
          anyOf:
          - $ref: '#/components/schemas/StopReasonType'
          - type: 'null'
          description: The stop reason from the agent's last run.
        timezone:
          anyOf:
          - type: string
          - type: 'null'
          title: Timezone
          description: The timezone of the agent (IANA format).
        max_files_open:
          anyOf:
          - type: integer
          - type: 'null'
          title: Max Files Open
          description: Maximum number of files that can be open at once for this agent. Setting this too high may exceed the context window, which will break the agent.
        per_file_view_window_char_limit:
          anyOf:
          - type: integer
          - type: 'null'
          title: Per File View Window Char Limit
          description: The per-file view window character limit for this agent. Setting this too high may exceed the context window, which will break the agent.
        hidden:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Hidden
          description: If set to True, the agent will be hidden.
      additionalProperties: false
      type: object
      required:
      - id
      - name
      - system
      - agent_ty

# --- truncated at 32 KB (119 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/letta/refs/heads/main/openapi/letta-mcp-servers-api-openapi.yml