Examples

Live demos

Use list_sessions readonly for a linked badge, or delete_session for a plain inline reference.

Tool cards

list_sessions

list_sessions
readonly tool
readonly tool
list_sessions

List active sessions for one server.

Returns:

list[str]

create_session

create_session
mutating tool
mutating tool
create_session

Create one session and return the created record.

Returns:

dict[str, str | int | bool]

delete_session

delete_session
destructive tool
destructive tool
delete_session

Delete one session from the server.

Returns:

bool

Parameter table

Parameters

Parameter

Type

Required

Default

Description

name

str

yes

Session name to create.

window_count

int

no

1

Initial number of windows.

detached

bool

no

False

Whether to create the session detached from the current client.

Tool summary

Inspect

Read state without changing anything.

Tool

Description

list_sessions

List active sessions for one server.

Act

Create or modify objects.

Tool

Description

create_session

Create one session and return the created record.

Destroy

Remove objects; not reversible.

Tool

Description

delete_session

Delete one session from the server.

Demo module reference

The demo objects above, as plain Python API — the targets the entries’ Python path facts link to:

Synthetic FastMCP tools for the documentation page live demos.

Examples

>>> list_sessions("prod")
['prod:0', 'prod:1']
>>> create_session("demo")["name"]
'demo'
>>> delete_session("old-session")
True
fastmcp_demo_tools.list_sessions(server, limit=20)
function[source]
function[source]
fastmcp_demo_tools.list_sessions(server, limit=20)

List active sessions for one server.

Parameters:
  • server (str) – Server name to inspect.

  • limit (int) – Maximum number of sessions to return.

Returns:

Session identifiers for the server.

Return type:

list[str]

Examples

>>> list_sessions("prod")
['prod:0', 'prod:1']
fastmcp_demo_tools.create_session(name, window_count=1, detached=False)
function[source]
function[source]
fastmcp_demo_tools.create_session(name, window_count=1, detached=False)

Create one session and return the created record.

Parameters:
  • name (str) – Session name to create.

  • window_count (int) – Initial number of windows.

  • detached (bool) – Whether to create the session detached from the current client.

Returns:

Created session metadata.

Return type:

dict[str, str | int | bool]

Examples

>>> create_session("demo")
{'name': 'demo', 'windows': 1, 'detached': False}
fastmcp_demo_tools.delete_session(name, force=False)
function[source]
function[source]
fastmcp_demo_tools.delete_session(name, force=False)

Delete one session from the server.

Parameters:
  • name (str) – Session name to delete.

  • force (bool) – Whether to skip confirmation checks.

Returns:

True when the session was removed.

Return type:

bool

Examples

>>> delete_session("old-session")
True