> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getmcp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export Tools

> Export a server's tools as a versioned JSON manifest for round-tripping.

Returns a versioned JSON manifest of every tool on the server (or a selected subset). Pair with [`POST /tools/import-getmcp`](/api-reference/tools/import-getmcp) on the receiving server to clone the catalog.

<Note>
  Identifiers (`id`, `uuid`, `server_id`) and bookkeeping fields (`created_at`, `updated_at`, `last_tested_at`, `last_test_response_ms`) are deliberately stripped — they're meaningless on the receiving server. Authentication is **not** included; configure auth on the destination server separately.
</Note>

<Note>
  Tools are exported regardless of status — `draft`, `active`, and `inactive` rows all land in the manifest with their original `status` field intact.
</Note>

## Path Parameters

<ParamField path="server_id" type="string" required>
  The UUID of the source server (e.g. `836995ae-1cff-41ec-823e-a4f07ccca3a0`). Numeric IDs are also accepted for backwards compatibility.
</ParamField>

## Body Parameters

<ParamField body="tool_ids" type="array">
  Optional array of tool UUIDs to limit the export to. When omitted (or empty), every tool on the server is exported. UUIDs that don't belong to the server are silently skipped.
</ParamField>

<RequestExample>
  ```bash cURL — Export all tools theme={null}
  curl --request POST \
       --url https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/export \
       --header 'Authorization: Bearer gmcp_your_api_key' \
       --header 'content-type: application/json' \
       --data '{
      "tool_ids": [
          "448fd610-2a86-4e49-b4db-f2e8d2af381b",
          "bf707299-9d5f-4996-9a19-e2dd634be3b8",
          "5c0035c6-ad10-4c4c-a61f-14549ef112a4"
      ]
  }'
  ```

  ```bash cURL — Export selected tools theme={null}
  curl --request POST \
       --url https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/export \
       --header 'Authorization: Bearer gmcp_your_api_key' \
       --header 'content-type: application/json' \
       --data '{
         "tool_ids": [
           "5376af81-6bb8-4b01-800c-508d7672e394",
           "e7a3c1d2-4f5b-6a7c-8d9e-0f1a2b3c4d5e"
         ]
       }'
  ```

  ```python Python theme={null}
  import json, requests

  response = requests.post(
      "https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/export",
      headers={
          "Authorization": "Bearer gmcp_your_api_key",
          "Content-Type": "application/json",
      },
      json={},
  )
  manifest = response.json()

  with open("./manifest.json", "w") as f:
      json.dump(manifest, f, indent=2)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/export",
    {
      method: "POST",
      headers: {
        "Authorization": "Bearer gmcp_your_api_key",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({}),
    }
  );
  const manifest = await response.json();
  ```

  ```php PHP theme={null}
  $response = wp_remote_post(
      "https://yoursite.com/wp-json/getmcp/v1/servers/836995ae-1cff-41ec-823e-a4f07ccca3a0/tools/export",
      [
          "headers" => [
              "Authorization" => "Bearer gmcp_your_api_key",
              "Content-Type"  => "application/json",
          ],
          "body" => wp_json_encode( new stdClass() ),
      ]
  );
  $manifest = json_decode( wp_remote_retrieve_body( $response ), true );
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "format": "getmcp/tools-v1",
    "exported_at": "2025-03-18T10:00:00+00:00",
    "server": {
      "name": "My Weather Tools",
      "slug": "my-weather-tools"
    },
    "tools": [
      {
        "name": "Get Weather",
        "slug": "get_weather",
        "description": "Get current weather for a city",
        "endpoint_url": "https://wttr.in/{{city}}?format=j1",
        "http_method": "GET",
        "input_schema": {
          "type": "object",
          "properties": {
            "city": { "type": "string", "description": "The city name" }
          },
          "required": ["city"]
        },
        "parameter_mapping": {
          "city": { "target": "path", "key": "city" }
        },
        "response_mapping": {
          "selector": "",
          "format": "json",
          "template": ""
        },
        "headers": null,
        "timeout": 30,
        "cache_ttl": 300,
        "retry_count": 0,
        "retry_backoff": "exponential",
        "rate_limit_per_min": 60,
        "status": "active",
        "tags": [],
        "sort_order": 0
      }
    ]
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "code": "server_not_found",
    "message": "Server not found.",
    "data": { "status": 404 }
  }
  ```
</ResponseExample>

## Response Fields

<ResponseField name="format" type="string">
  Manifest format identifier. Currently `getmcp/tools-v1`. Importers reject anything not prefixed with `getmcp/tools-v`.
</ResponseField>

<ResponseField name="exported_at" type="string">
  ISO 8601 UTC timestamp of when the manifest was generated.
</ResponseField>

<ResponseField name="server" type="object">
  Source server metadata (`name`, `slug`) — informational only.
</ResponseField>

<ResponseField name="tools" type="array">
  Array of tool objects in `sort_order` ascending. See the [import endpoint](/api-reference/tools/import-getmcp) for the per-tool field reference.
</ResponseField>
