clear-skies-mcp-server

v1.1.6
clear-skies-mcp-server Checked 12 hours ago Published 1 month ago

MCP server for the clearskies Python framework - provides code generation, documentation, and scaffolding tools

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_available_columns

List all available clearskies column types with a short description of each.

list_available_endpoints

List all available clearskies endpoint types with a short description of each.

list_available_backends

List all available clearskies backend types with a short description of each.

list_available_contexts

List all available clearskies context types with a short description of each.

list_available_authentication

List all available clearskies authentication types with a short description of each. Authentication types are used to secure endpoints. They can be attached to endpoints via the authentication parameter. Example: clearskies.endpoints.RestfulApi( model_class=User, authentication=clearskies.authentication.SecretBearer( environment_key="API_SECRET" ), readable_column_names=["id", "name", "email"], writeable_column_names=["name", "email"], searchable_column_names=["name", "email"],…

list_available_validators

List all available clearskies validator types with a short description of each. Validators are used to validate model data before saving. They can be attached to columns via the validators parameter. Example: from clearskies.validators import MinimumLength, Required name = columns.String(validators=[Required(), MinimumLength(3)])

list_available_exceptions

List all available clearskies exception types with a short description of each. These are the exceptions that clearskies may raise during operation. Understanding these helps with proper error handling in your application.

list_available_di_inject

List all available clearskies DI inject helpers with a short description of each. DI inject helpers are used to inject dependencies into your classes. They provide special injection behaviors beyond simple class instantiation. Example: class MyService: def __init__(self, utcnow: clearskies.di.inject.Utcnow): self.utcnow = utcnow

list_available_cursors

List all available clearskies cursor types with a short description of each. Cursors are used internally by backends to execute database queries. Understanding these is useful for advanced backend customization.

list_available_input_outputs

List all available clearskies input/output handlers with a short description of each. Input/output handlers define how data is read from requests and written to responses. They handle serialization formats like JSON, form data, etc.

list_available_configs

List all available clearskies configuration types with a short description of each. Configuration types are used to configure various aspects of clearskies behavior.

list_available_clients

List all available clearskies client types with a short description of each. Client types are used for making HTTP/API requests to external services.

list_available_secrets

List all available clearskies secrets handlers with a short description of each. Secrets handlers provide secure access to sensitive configuration values like API keys, database passwords, etc.

list_available_security_headers

List all available clearskies security header handlers with a short description of each. Security header handlers add security-related HTTP headers to responses, such as CORS headers, CSP, etc.

list_available_query

List all available clearskies query builder types with a short description of each. Query builders are used to construct database queries programmatically.

list_available_query_results

List all available clearskies query result types with a short description of each. Query result types handle the results returned from database queries.

list_available_functional

List all available clearskies functional utilities with a short description of each. Functional utilities provide helper functions and decorators for common patterns.

get_column_info

Get detailed documentation and constructor parameters for a specific clearskies column type. Args: column_type: The name of the column type (e.g. "String", "Integer", "BelongsToId").

ParameterTypeDescription
column_type *string

get_endpoint_info

Get detailed documentation and configuration options for a specific clearskies endpoint type. Args: endpoint_type: The name of the endpoint type (e.g. "RestfulApi", "Create", "List").

ParameterTypeDescription
endpoint_type *string

get_backend_info

Get detailed documentation for a specific clearskies backend type. Args: backend_type: The name of the backend type (e.g. "MemoryBackend", "CursorBackend", "ApiBackend").

ParameterTypeDescription
backend_type *string

get_context_info

Get detailed documentation for a specific clearskies context type. Args: context_type: The name of the context type (e.g. "Cli", "WsgiRef", "Wsgi").

ParameterTypeDescription
context_type *string

get_authentication_info

Get detailed documentation for a specific clearskies authentication type. Args: auth_type: The auth type name (e.g. "SecretBearer", "JWKS", "SecretBasic").

ParameterTypeDescription
auth_type *string

get_validator_info

Get detailed documentation for a specific clearskies validator type. Args: validator_type: The validator type name (e.g. "Required", "Unique", "Email").

ParameterTypeDescription
validator_type *string

get_exception_info

Get detailed documentation for a specific clearskies exception type. Args: exception_type: The exception type name (e.g. "InputError", "AuthenticationError").

ParameterTypeDescription
exception_type *string

get_di_inject_info

Get detailed documentation for a specific clearskies DI inject helper. Args: inject_type: The inject type name (e.g. "ByClass", "Utcnow").

ParameterTypeDescription
inject_type *string

get_cursor_info

Get detailed documentation for a specific clearskies cursor type. Args: cursor_type: The cursor type name.

ParameterTypeDescription
cursor_type *string

get_input_output_info

Get detailed documentation for a specific clearskies input/output handler. Args: io_type: The input/output type name.

ParameterTypeDescription
io_type *string

get_config_info

Get detailed documentation for a specific clearskies configuration type. Args: config_type: The config type name.

ParameterTypeDescription
config_type *string

get_client_info

Get detailed documentation for a specific clearskies client type. Args: client_type: The client type name.

ParameterTypeDescription
client_type *string

get_secret_info

Get detailed documentation for a specific clearskies secrets handler. Args: secret_type: The secret type name.

ParameterTypeDescription
secret_type *string

get_security_header_info

Get detailed documentation for a specific clearskies security header handler. Args: header_type: The security header type name.

ParameterTypeDescription
header_type *string

get_query_info

Get detailed documentation for a specific clearskies query builder type. Args: query_type: The query type name.

ParameterTypeDescription
query_type *string

get_query_result_info

Get detailed documentation for a specific clearskies query result type. Args: result_type: The query result type name.

ParameterTypeDescription
result_type *string

get_functional_info

Get detailed documentation for a specific clearskies functional utility. Args: func_name: The functional utility name.

ParameterTypeDescription
func_name *string

explain_concept

Explain a clearskies framework concept in detail. Args: concept: The concept to explain. One of: model, endpoint, backend, column, context, di, authentication, autodoc, query, validator, schema, save_lifecycle, state_machine, declarative_programming, infrastructure_neutral, testing, authorization, error_handling, input_handling, endpoint_groups, routing, responses, migrations, advanced_columns, advanced_queries, configuration, logging, caching, async, state_machine_advanced, secrets_backend.

ParameterTypeDescription
concept *string

generate_model

Generate a clearskies Model class definition. Args: name: The model class name in PascalCase (e.g. "User", "OrderProduct"). columns: List of column definitions. Each dict has: - name (str): Column name - type (str): Column type (e.g. "String", "Integer", "Uuid", "BelongsToId") - options (dict, optional): Keyword arguments for the column constructor backend_type: Backend class name (default: "MemoryBackend"). backend_options: Keyword arguments for the backend constructor. id_column_name: The name of the id column (…

ParameterTypeDescription
columns *array
name *string
backend_options
backend_typestring
hooks
id_column_namestring

generate_endpoint

Generate a clearskies endpoint configuration. Args: endpoint_type: Type of endpoint (e.g. "RestfulApi", "List", "Create", "Get", "Update", "Delete", "Callable"). model_name: The model class name to use with this endpoint. url: The URL path for the endpoint (optional). readable_column_names: List of column names that are returned in the response. writeable_column_names: List of column names the client can set. sortable_column_names: List of column names the client can sort by. searchable_column_names: List of column names the client c…

ParameterTypeDescription
endpoint_type *string
model_name *string
authenticationstring
default_sort_column_namestring
extra_options
readable_column_names
searchable_column_names
sortable_column_names
urlstring
writeable_column_names

generate_context

Generate a clearskies context configuration that wraps an endpoint. Args: context_type: The context type (e.g. "Cli", "WsgiRef", "Wsgi"). endpoint_code: The endpoint expression to wrap (e.g. output from generate_endpoint). classes: List of model class names to register with DI. modules: List of module names to register with DI. bindings: Dictionary of name → value DI bindings.

ParameterTypeDescription
context_type *string
endpoint_code *string
bindings
classes
modules

generate_endpoint_group

Generate a clearskies EndpointGroup configuration. Args: url: The URL prefix for all endpoints in the group. endpoints: List of endpoint configurations. Each dict has: - type (str): Endpoint type (e.g. "RestfulApi", "Callable", "List") - model_name (str): Model class name (for model-based endpoints) - url (str): URL path for this endpoint - readable_column_names (list[str], optional): Readable columns - writeable_column_names (list[str], optional): Writeable columns - sortable_column_names (list[str],…

ParameterTypeDescription
authenticationstring
endpoints
urlstring

scaffold_project

Generate a complete clearskies project with models and endpoints. Returns the full file content for a working clearskies application. Args: project_name: The name of the project/application. models: List of model definitions. Each dict has: - name (str): Model class name in PascalCase - columns (list[dict]): Column definitions (same format as generate_model) - backend_type (str, optional): Backend type (default: "MemoryBackend") - id_column_name (str, optional): Id column name (default: "id") - url (str, opti…

ParameterTypeDescription
models *array
project_name *string
context_typestring
endpoint_typestring

scaffold_restful_api

Generate a complete, runnable clearskies REST API application for a single model. This is a convenience tool that generates a model, a RestfulApi endpoint, and a context in a single file ready to run. Args: model_name: Model class name in PascalCase (e.g. "User"). columns: List of column definitions. Each dict has: - name (str): Column name - type (str): Column type - options (dict, optional): Column constructor options url: URL path (default: auto-generated from model name). backend_type: Backend type (default:…

ParameterTypeDescription
columns *array
model_name *string
authenticationstring
backend_options
backend_typestring
context_typestring
urlstring

generate_model_with_relationships

Generate multiple related clearskies Model classes with their relationships properly configured. Use this when you need to create models with BelongsTo, HasMany, or ManyToMany relationships. Args: models: List of model definitions. Each dict has: - name (str): Model class name - columns (list[dict]): Column definitions - backend_type (str, optional): Backend type - id_column_name (str, optional): Id column name

ParameterTypeDescription
models *array

list_modules

List all available clearskies extension modules with a summary of what each provides. Shows installation status, version (if installed), and component counts for each known clearskies extension module.

get_module_info

Get detailed documentation for a specific clearskies extension module. Shows installation status, version, and all discovered components with their descriptions and parameters. Args: module_name: The module name (e.g. "clearskies-aws", "clearskies-graphql", "clearskies-snyk").

ParameterTypeDescription
module_name *string

explain_module

Get usage examples and integration guidance for a specific clearskies extension module. Args: module_name: The module name (e.g. "clearskies-aws", "clearskies-graphql", "clearskies-snyk", "clearskies-gitlab", "clearskies-cortex", "clearskies-akeyless-custom-producer").

ParameterTypeDescription
module_name *string

get_module_components

Get detailed component information for a module. Lists all components in a module, optionally filtered by category, with their descriptions and constructor parameters. Args: module_name: The module name (e.g. "clearskies-aws") category: Optional category filter (e.g. "backends", "contexts", "models")

ParameterTypeDescription
module_name *string
category

suggest_modules

Suggest modules that provide a specific component type. Args: component_type: The component category (e.g. "backends", "contexts", "models")

ParameterTypeDescription
component_type *string

check_module_compatibility

Check if a module is installed and compatible. Args: module_name: The module name to check

ParameterTypeDescription
module_name *string

refresh_module_cache

Refresh the module discovery cache. Forces re-discovery of all modules, useful after installing new modules.

analyze_v1_project

Analyze a ClearSkies v1 project and generate migration report. Args: project_path: Path to the v1 project directory Returns: Dictionary containing: - models: List of discovered models - handlers: List of discovered handlers - errors: List of parsing errors - warnings: List of migration warnings - complexity: Migration complexity assessment

ParameterTypeDescription
project_path *string

generate_v2_migration

Generate v2 code from a v1 project. This tool analyzes a v1 codebase and generates v2-compatible code. Use dry_run=True to preview changes without writing files. Args: project_path: Path to the v1 project directory output_path: Path where v2 code should be generated dry_run: If True, don't write files (default: True) Returns: Dictionary containing: - files: List of files to create/modify - breaking_changes: List of breaking changes - warnings: List of warnings - manual_steps: List of manual steps required…

ParameterTypeDescription
output_path *string
project_path *string
dry_runboolean

map_v1_to_v2

Map a v1 code snippet to its v2 equivalent. Useful for understanding how specific v1 patterns translate to v2. Args: v1_code_snippet: The v1 code to convert context: Context hint ('model', 'handler', 'di', 'general') Returns: Dictionary containing: - v2_code: Converted v2 code - breaking_changes: List of breaking changes - notes: Migration notes

ParameterTypeDescription
v1_code_snippet *string
contextstring

explain_v1_v2_difference

Explain how a specific concept changed between v1 and v2. Args: concept: The concept to explain. Options: - 'model': Model definition changes - 'handler': Handler → Endpoint changes - 'di': Dependency injection changes - 'columns': Column definition changes - 'application': Application → Context changes - 'backend': Backend configuration changes - 'type_hints': Type hint requirements Returns: Detailed explanation of the changes

ParameterTypeDescription
concept *string

get_migration_checklist

Get a comprehensive checklist for v1 to v2 migration. Returns: Dictionary with migration phases and tasks