Back to Smithery

List runtime logs

docs-api-reference-servers-list-runtime-logs.md

latest6.9 KB
Original Source

GET

/

servers

/

{qualifiedName}

/

logs

Try it

JavaScript

JavaScript

import Smithery from '@smithery/api';

const client = new Smithery({
  apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted
});

const logs = await client.servers.logs.list('qualifiedName');

console.log(logs.invocations);
curl --request GET \
  --url https://api.smithery.ai/servers/{qualifiedName}/logs \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.smithery.ai/servers/{qualifiedName}/logs"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.smithery.ai/servers/{qualifiedName}/logs",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.smithery.ai/servers/{qualifiedName}/logs"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.smithery.ai/servers/{qualifiedName}/logs")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.smithery.ai/servers/{qualifiedName}/logs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body

200

403

404

500

{
  "invocations": [
    {
      "id": "625f9ce6-f179-4f23-b3e3-4de28b52b39d",
      "timestamp": "2026-01-04 10:53:39",
      "request": {
        "method": "POST",
        "url": "https://gateway.smithery.ai/@smithery/unicorn"
      },
      "response": {
        "status": 200,
        "outcome": "ok"
      },
      "duration": {
        "cpuMs": 5,
        "wallMs": 743
      },
      "logs": [
        {
          "timestamp": "2026-01-04 10:53:39",
          "level": "info",
          "message": "Processing request..."
        }
      ],
      "exceptions": [
        {
          "timestamp": "2026-01-04 10:53:39",
          "name": "TypeError",
          "message": "Cannot read property 'x' of undefined"
        }
      ]
    }
  ],
  "total": 123
}
{
  "error": "Server not found"
}
{
  "error": "Server not found"
}
{
  "error": "Server not found"
}

Authorizations

[​

](#authorization-authorization)

Authorization

string

header

required

Smithery API key as Bearer token

Path Parameters

[​

](#parameter-qualified-name)

qualifiedName

string

required

The server's qualified name (e.g. 'namespace/server' or 'namespace' for namespace-only servers). Use %2F to encode the slash.

Query Parameters

[​

](#parameter-from)

from

string

Start of time range (ISO 8601).

Example:

"2026-01-01T00:00:00Z"

[​

](#parameter-to)

to

string

End of time range (ISO 8601).

Example:

"2026-01-01T01:00:00Z"

[​

](#parameter-limit)

limit

integer

Max invocations to return. Defaults to 20.

Required range: 1 <= x <= 100

Example:

20

[​

](#parameter-search)

search

string

Text search across log messages.

Example:

"error"

Response

200

application/json

Logs fetched successfully

[​

](#response-invocations)

invocations

object[]

required

Show child attributes

[​

](#response-total)

total

number

required

Total invocations matching query

Was this page helpful?

YesNo

⌘I

JavaScript

JavaScript

import Smithery from '@smithery/api';

const client = new Smithery({
  apiKey: process.env['SMITHERY_API_KEY'], // This is the default and can be omitted
});

const logs = await client.servers.logs.list('qualifiedName');

console.log(logs.invocations);
curl --request GET \
  --url https://api.smithery.ai/servers/{qualifiedName}/logs \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.smithery.ai/servers/{qualifiedName}/logs"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.smithery.ai/servers/{qualifiedName}/logs",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.smithery.ai/servers/{qualifiedName}/logs"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.smithery.ai/servers/{qualifiedName}/logs")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.smithery.ai/servers/{qualifiedName}/logs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body

200

403

404

500

{
  "invocations": [
    {
      "id": "625f9ce6-f179-4f23-b3e3-4de28b52b39d",
      "timestamp": "2026-01-04 10:53:39",
      "request": {
        "method": "POST",
        "url": "https://gateway.smithery.ai/@smithery/unicorn"
      },
      "response": {
        "status": 200,
        "outcome": "ok"
      },
      "duration": {
        "cpuMs": 5,
        "wallMs": 743
      },
      "logs": [
        {
          "timestamp": "2026-01-04 10:53:39",
          "level": "info",
          "message": "Processing request..."
        }
      ],
      "exceptions": [
        {
          "timestamp": "2026-01-04 10:53:39",
          "name": "TypeError",
          "message": "Cannot read property 'x' of undefined"
        }
      ]
    }
  ],
  "total": 123
}
{
  "error": "Server not found"
}
{
  "error": "Server not found"
}
{
  "error": "Server not found"
}