Liking cljdoc? Tell your friends :D

mcp-toolkit.server


add-promptclj/s

(add-prompt context prompt)

Adds a prompt to the server's prompt registry and notifies the client.

Args: context - The server session context prompt - Prompt map with :name key and other prompt configuration

Returns: nil

Adds a prompt to the server's prompt registry and notifies the client.

Args:
  context - The server session context
  prompt  - Prompt map with :name key and other prompt configuration

Returns:
  nil
sourceraw docstring

add-resourceclj/s

(add-resource context resource)

Adds a resource to the server's resource registry and notifies the client.

Args: context - The server session context resource - Resource map with :uri key and other resource configuration

Returns: nil

Adds a resource to the server's resource registry and notifies the client.

Args:
  context  - The server session context
  resource - Resource map with :uri key and other resource configuration

Returns:
  nil
sourceraw docstring

add-toolclj/s

(add-tool context tool)

Adds a tool to the server's tool registry and notifies the client.

Args: context - The server session context tool - Tool map with :name key and other tool configuration

Returns: nil

Adds a tool to the server's tool registry and notifies the client.

Args:
  context - The server session context
  tool    - Tool map with :name key and other tool configuration

Returns:
  nil
sourceraw docstring

create-sessionclj/s

(create-session {:keys [server-info server-instructions prompts resources tools
                        resource-templates resource-uri-complete-fn
                        logging-level on-initialized on-client-root-list-changed
                        on-client-root-list-updated]
                 :or {server-info {:name "mcp-toolkit" :version "0.1.0-alpha"}
                      logging-level "info"
                      on-initialized request-root-list
                      on-client-root-list-changed request-root-list}})

Returns the state of a newly created session.

Returns the state of a newly created session.
sourceraw docstring

notify-logclj/s

(notify-log context level logger data)

Sends a log message to the client if it meets the current logging level threshold. (see https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/logging#log-message-notifications)

Args: context - The server session context level - Logging level, accepted values are "debug", "info", "notice", "warning", "error", "critical", "alert" and "emergency" logger - Logger name/identifier string data - Log message data (typically a string)

Returns: nil

Sends a log message to the client if it meets the current logging level threshold.
(see https://modelcontextprotocol.io/specification/2025-06-18/server/utilities/logging#log-message-notifications)

Args:
  context - The server session context
  level   - Logging level, accepted values are "debug", "info", "notice", "warning", "error", "critical", "alert" and "emergency"
  logger  - Logger name/identifier string
  data    - Log message data (typically a string)

Returns:
  nil
sourceraw docstring

notify-progressclj/s

(notify-progress context progress)

Notifies the client about progress during tool or prompt execution. Only sends if the current message contains a progress token. (see https://modelcontextprotocol.io/specification/2025-06-18/basic/utilities/progress#progress-flow)

Args: context - The server session context progress - Map with progress information (e.g., {:progress 50 :total 100})

Returns: nil

Notifies the client about progress during tool or prompt execution.
Only sends if the current message contains a progress token.
(see https://modelcontextprotocol.io/specification/2025-06-18/basic/utilities/progress#progress-flow)

Args:
  context  - The server session context
  progress - Map with progress information (e.g., {:progress 50 :total 100})

Returns:
  nil
sourceraw docstring

notify-prompt-list-changedclj/s

(notify-prompt-list-changed context)

Notifies the client that the server's prompt list has changed. (see https://modelcontextprotocol.io/specification/2025-06-18/server/prompts#list-changed-notification)

Args: context - The server session context

Returns: nil

Notifies the client that the server's prompt list has changed.
(see https://modelcontextprotocol.io/specification/2025-06-18/server/prompts#list-changed-notification)

Args:
  context - The server session context

Returns:
  nil
sourceraw docstring

notify-resource-list-changedclj/s

(notify-resource-list-changed context)

Notifies the client that the server's resource list has changed. (see https://modelcontextprotocol.io/specification/2025-06-18/server/resources#list-changed-notification)

Args: context - The server session context

Returns: nil

Notifies the client that the server's resource list has changed.
(see https://modelcontextprotocol.io/specification/2025-06-18/server/resources#list-changed-notification)

Args:
  context - The server session context

Returns:
  nil
sourceraw docstring

notify-resource-updatedclj/s

(notify-resource-updated context resource)

Notifies subscribed clients about a specific resource update. Only sends notification if the client is subscribed to the resource URI. (see https://modelcontextprotocol.io/specification/2025-06-18/server/resources#subscriptions)

Args: context - The server session context resource - Resource map with :uri key

Returns: nil

Notifies subscribed clients about a specific resource update.
Only sends notification if the client is subscribed to the resource URI.
(see https://modelcontextprotocol.io/specification/2025-06-18/server/resources#subscriptions)

Args:
  context  - The server session context
  resource - Resource map with :uri key

Returns:
  nil
sourceraw docstring

notify-tool-list-changedclj/s

(notify-tool-list-changed context)

Notifies the client that the server's tool list has changed. (see https://modelcontextprotocol.io/specification/2025-06-18/server/tools#list-changed-notification)

Args: context - The server session context

Returns: nil

Notifies the client that the server's tool list has changed.
(see https://modelcontextprotocol.io/specification/2025-06-18/server/tools#list-changed-notification)

 Args:
   context - The server session context

 Returns:
   nil
sourceraw docstring

remove-promptclj/s

(remove-prompt context prompt)

Removes a prompt from the server's prompt registry and notifies the client.

Args: context - The server session context prompt - Prompt map with :name key to identify which prompt to remove

Returns: nil

Removes a prompt from the server's prompt registry and notifies the client.

Args:
  context - The server session context
  prompt  - Prompt map with :name key to identify which prompt to remove

Returns:
  nil
sourceraw docstring

remove-resourceclj/s

(remove-resource context resource)

Removes a resource from the server's resource registry and notifies the client.

Args: context - The server session context resource - Resource map with :uri key to identify which resource to remove

Returns: nil

Removes a resource from the server's resource registry and notifies the client.

Args:
  context  - The server session context
  resource - Resource map with :uri key to identify which resource to remove

Returns:
  nil
sourceraw docstring

remove-toolclj/s

(remove-tool context tool)

Removes a tool from the server's tool registry and notifies the client.

Args: context - The server session context tool - Tool map with :name key to identify which tool to remove

Returns: nil

Removes a tool from the server's tool registry and notifies the client.

Args:
  context - The server session context
  tool    - Tool map with :name key to identify which tool to remove

Returns:
  nil
sourceraw docstring

request-root-listclj/s

(request-root-list context)

Requests the list of root directories from the MCP client. Updates the session's client-root-by-uri index and calls the on-client-root-list-updated callback. (see https://modelcontextprotocol.io/specification/2025-06-18/client/roots#listing-roots)

Args: context - The server session context

Returns: A promise that resolves when roots are fetched and stored.

Requests the list of root directories from the MCP client.
Updates the session's client-root-by-uri index and calls the
on-client-root-list-updated callback.
(see https://modelcontextprotocol.io/specification/2025-06-18/client/roots#listing-roots)

Args:
  context - The server session context

Returns:
  A promise that resolves when roots are fetched and stored.
sourceraw docstring

request-samplingclj/s

(request-sampling context params)

Requests message sampling from the MCP client. Returns a promise, either resolved with the result or rejected with the error. (see https://modelcontextprotocol.io/specification/2025-06-18/client/sampling#creating-messages)

Args: context - The server session context params - Sampling parameters map

Returns: A promise that resolves to the sampling result from the client.

Requests message sampling from the MCP client.
Returns a promise, either resolved with the result or rejected with the error.
(see https://modelcontextprotocol.io/specification/2025-06-18/client/sampling#creating-messages)

Args:
  context - The server session context
  params  - Sampling parameters map

Returns:
  A promise that resolves to the sampling result from the client.
sourceraw docstring

set-resource-templatesclj/s

(set-resource-templates context resource-templates)

Sets the resource templates for the server session.

Args: context - The server session context resource-templates - Vector of resource template maps

Returns: nil

Sets the resource templates for the server session.

Args:
  context            - The server session context
  resource-templates - Vector of resource template maps

Returns:
  nil
sourceraw docstring

set-resource-uri-complete-fnclj/s

(set-resource-uri-complete-fn context resource-uri-complete-fn)

Sets the resource URI completion function for the server session.

Args: context - The server session context resource-uri-complete-fn - Function to handle resource URI completion requests

Returns: nil

Sets the resource URI completion function for the server session.

Args:
  context                   - The server session context
  resource-uri-complete-fn  - Function to handle resource URI completion requests

Returns:
  nil
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close