Skip to main content
GET
/
servers
/
{namespace}
/
{server}
/
logs
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('server', { namespace: 'namespace' });

console.log(logs.invocations);
{
  "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",
          "stack": "at handler (main.js:42:15)"
        }
      ]
    }
  ],
  "total": 123
}

Authorizations

Authorization
string
header
required

Smithery API key as Bearer token

Path Parameters

namespace
string
required
server
string
required

Query Parameters

from
string

Start of time range (ISO 8601).

Example:

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

to
string

End of time range (ISO 8601).

Example:

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

limit
integer

Max invocations to return. Defaults to 50.

Required range: 1 <= x <= 100
Example:

50

Response

Logs fetched successfully

invocations
object[]
required
total
number
required

Total invocations matching query