Skip to main content
Glama
get_process.py1.72 kB
"""MCP tool for retrieving a process by name. Implements the get_process tool per mcp-tools.json contract. """ from __future__ import annotations from typing import TYPE_CHECKING, Any from sso_mcp_server import get_logger if TYPE_CHECKING: from sso_mcp_server.processes.service import ProcessService _logger = get_logger("get_process_tool") def get_process_impl(name: str, service: ProcessService) -> dict[str, Any]: """Implementation of get_process tool. Retrieves a development process by name, returning its content and metadata. Args: name: Name of the process to retrieve. service: ProcessService instance. Returns: Dictionary with process data or error information. Success response includes: name, description, content. Error response includes: error, message, available. """ _logger.info("get_process_request", process_name=name) process = service.get_process(name) if process is None: # Process not found - include available processes in response (FR-015) available = service.get_available_names() _logger.warning( "process_not_found", requested_name=name, available_count=len(available), ) return { "error": "PROCESS_NOT_FOUND", "message": f"Process '{name}' not found.", "available": available, } _logger.info( "process_retrieved", process_name=process["name"], content_length=len(process.get("content", "")), ) return { "name": process["name"], "description": process.get("description", ""), "content": process.get("content", ""), }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DauQuangThanh/sso-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server