Skip to main content
Glama
clearskies-py

clearskies MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_available_columnsA

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

list_available_endpointsA

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

list_available_backendsA

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

list_available_contextsA

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

list_available_authenticationA

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"
        )
    )
list_available_validatorsA

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:
    name = columns.String(validators=[Required(), MinLength(3)])
list_available_exceptionsA

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_injectA

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_cursorsA

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_outputsA

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_configsA

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_clientsA

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_secretsA

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_headersA

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_queryA

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_resultsA

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_functionalA

List all available clearskies functional utilities with a short description of each.

Functional utilities provide helper functions and decorators for common patterns.

get_column_infoA

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").
get_endpoint_infoA

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").
get_backend_infoA

Get detailed documentation for a specific clearskies backend type.

Args:
    backend_type: The name of the backend type (e.g. "MemoryBackend", "CursorBackend", "ApiBackend").
get_context_infoA

Get detailed documentation for a specific clearskies context type.

Args:
    context_type: The name of the context type (e.g. "Cli", "WsgiRef", "Wsgi").
get_authentication_infoA

Get detailed documentation for a specific clearskies authentication type.

Args:
    auth_type: The auth type name (e.g. "SecretBearer", "JWKS", "SecretBasic").
get_validator_infoA

Get detailed documentation for a specific clearskies validator type.

Args:
    validator_type: The validator type name (e.g. "Required", "Unique", "Email").
get_exception_infoA

Get detailed documentation for a specific clearskies exception type.

Args:
    exception_type: The exception type name (e.g. "InputError", "AuthenticationError").
get_di_inject_infoA

Get detailed documentation for a specific clearskies DI inject helper.

Args:
    inject_type: The inject type name (e.g. "ByClass", "Utcnow").
get_cursor_infoA

Get detailed documentation for a specific clearskies cursor type.

Args:
    cursor_type: The cursor type name.
get_input_output_infoA

Get detailed documentation for a specific clearskies input/output handler.

Args:
    io_type: The input/output type name.
get_config_infoB

Get detailed documentation for a specific clearskies configuration type.

Args:
    config_type: The config type name.
get_client_infoC

Get detailed documentation for a specific clearskies client type.

Args:
    client_type: The client type name.
get_secret_infoB

Get detailed documentation for a specific clearskies secrets handler.

Args:
    secret_type: The secret type name.
get_security_header_infoC

Get detailed documentation for a specific clearskies security header handler.

Args:
    header_type: The security header type name.
get_query_infoB

Get detailed documentation for a specific clearskies query builder type.

Args:
    query_type: The query type name.
get_query_result_infoC

Get detailed documentation for a specific clearskies query result type.

Args:
    result_type: The query result type name.
get_functional_infoA

Get detailed documentation for a specific clearskies functional utility.

Args:
    func_name: The functional utility name.
explain_conceptA

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.
generate_modelA

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 (default: "id").
    hooks: Optional list of hook methods to include stubs for (e.g. ["pre_save", "post_save", "save_finished"]).
generate_endpointB

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 can search by.
    default_sort_column_name: The default column to sort by.
    authentication: Authentication configuration (e.g. 'clearskies.authentication.SecretBearer(environment_key="MY_SECRET")').
    extra_options: Additional keyword arguments for the endpoint constructor.
generate_contextA

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.
generate_endpoint_groupA

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], optional): Sortable columns
        - searchable_column_names (list[str], optional): Searchable columns
        - default_sort_column_name (str, optional): Default sort column
        - request_methods (list[str], optional): Allowed HTTP methods (for Callable)
        - extra_options (dict, optional): Additional endpoint options
    authentication: Authentication configuration for all endpoints in the group
        (e.g. 'clearskies.authentication.SecretBearer(environment_key="MY_SECRET")').
scaffold_projectA

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, optional): URL path for the REST API
        - readable_column_names (list[str], optional): Readable columns
        - writeable_column_names (list[str], optional): Writeable columns
        - sortable_column_names (list[str], optional): Sortable columns
        - searchable_column_names (list[str], optional): Searchable columns
        - default_sort_column_name (str, optional): Default sort column
    context_type: The context type to use (default: "WsgiRef").
    endpoint_type: Endpoint type to use (default: "RestfulApi").
scaffold_restful_apiA

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: "MemoryBackend").
    backend_options: Backend constructor options.
    authentication: Authentication expression.
    context_type: Context type (default: "WsgiRef").
generate_model_with_relationshipsA

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
list_modulesA

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_infoA

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").
explain_moduleA

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").
get_module_componentsA

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")
suggest_modulesB

Suggest modules that provide a specific component type.

Args:
    component_type: The component category (e.g. "backends", "contexts", "models")
check_module_compatibilityC

Check if a module is installed and compatible.

Args:
    module_name: The module name to check
refresh_module_cacheA

Refresh the module discovery cache.

Forces re-discovery of all modules, useful after installing new modules.

analyze_v1_projectA
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
generate_v2_migrationA
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
map_v1_to_v2A
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
explain_v1_v2_differenceA
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
get_migration_checklistA
Get a comprehensive checklist for v1 to v2 migration.

Returns:
    Dictionary with migration phases and tasks

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
docs_overviewOverview of the clearskies framework.
docs_modelsDetailed documentation about clearskies Models.
docs_endpointsDocumentation about clearskies Endpoints.
docs_columnsDocumentation about clearskies Column types.
docs_backendsDocumentation about clearskies Backends.
docs_contextsDocumentation about clearskies Contexts.
docs_diDocumentation about clearskies Dependency Injection.
docs_authenticationDocumentation about clearskies Authentication.
docs_save_lifecycleDocumentation about the clearskies save lifecycle.
docs_queriesDocumentation about clearskies queries.
docs_validatorsDocumentation about clearskies validators.
docs_schemaDocumentation about clearskies Schema class.
docs_testingDocumentation about testing clearskies applications.
docs_authorizationDocumentation about clearskies authorization patterns.
docs_error_handlingDocumentation about clearskies error handling.
docs_input_handlingDocumentation about clearskies input handling.
docs_endpoint_groupsDocumentation about clearskies endpoint groups.
docs_routingDocumentation about clearskies routing.
docs_responsesDocumentation about clearskies response customization.
docs_migrationsDocumentation about clearskies database migrations (Mygrations).
docs_advanced_columnsDocumentation about advanced clearskies column types.
docs_advanced_queriesDocumentation about advanced clearskies query patterns.
docs_configurationDocumentation about clearskies configuration management.
docs_loggingDocumentation about logging and observability in clearskies.
docs_cachingDocumentation about caching patterns in clearskies.
docs_asyncDocumentation about async patterns in clearskies.
docs_state_machineDocumentation about state machines in clearskies.
docs_state_machine_advancedDocumentation about advanced state machine patterns in clearskies.
docs_autodocDocumentation about automatic API documentation generation.
docs_declarative_programmingDocumentation about declarative programming in clearskies.
docs_infrastructure_neutralDocumentation about infrastructure-neutral deployment.
docs_secrets_backendDocumentation about the secrets backend in clearskies.
docs_backend_memoryDeep dive documentation about MemoryBackend.
docs_backend_cursorDeep dive documentation about CursorBackend.
docs_cursorsDocumentation about cursors and raw SQL in clearskies.
docs_transactionsDocumentation about transaction management in clearskies.
docs_di_advancedAdvanced DI patterns and troubleshooting in clearskies.
docs_query_executionDocumentation about query execution model in clearskies.
docs_model_lifecycleDocumentation about model lifecycle in clearskies.
docs_input_outputDocumentation about the input/output system in clearskies.
docs_troubleshootingTroubleshooting guide for clearskies applications.
docs_best_practicesBest practices for clearskies development.
docs_exceptionsException hierarchy reference for clearskies.
docs_auth_flowAuthentication and authorization flow documentation.
docs_column_referenceComplete column parameter reference for clearskies.
docs_endpoint_referenceComplete endpoint parameter reference for clearskies.
docs_performancePerformance guide for clearskies applications.
docs_patternsCommon patterns cookbook for clearskies.
docs_injectable_propertiesDocumentation about the InjectableProperties mixin.
docs_configurableDocumentation about the Configurable mixin.
docs_loggableDocumentation about the Loggable mixin.
docs_injectableDocumentation about the Injectable abstract base class.
docs_configs_moduleDocumentation about the configs module.
docs_component_inheritanceDocumentation about component inheritance hierarchy.
example_restful_apiComplete example of a clearskies RESTful API.
example_relationshipsExample of clearskies models with relationships.
example_authenticationExample of clearskies authentication.
example_cli_appExample of a clearskies CLI application.
example_api_backendExample of using clearskies as an API client with ApiBackend.
example_testingExample of testing clearskies applications.
example_authorizationExample of clearskies authorization patterns.
example_error_handlingExample of clearskies error handling.
example_endpoint_groupExample of clearskies endpoint groups.
example_migrationsExample of clearskies database migrations.
example_hierarchical_dataExample of hierarchical data with CategoryTree columns.
example_audit_trailExample of audit trail tracking with the Audit column.
example_pivot_dataExample of many-to-many relationships with pivot data.
example_advanced_queriesExample of advanced query patterns in clearskies.
example_configurationExample of configuration management in clearskies.
example_state_machine_advancedExample of advanced state machine patterns in clearskies.
example_secrets_backendExample of using the secrets backend in clearskies.
modules_overviewOverview of all clearskies extension modules.
module_awsDocumentation for the clearskies-aws module.
module_graphqlDocumentation for the clearskies-graphql module.
module_gitlabDocumentation for the clearskies-gitlab module.
module_cortexDocumentation for the clearskies-cortex module.
module_snykDocumentation for the clearskies-snyk module.
module_akeylessDocumentation for the clearskies-akeyless-custom-producer module.
style_docstringsDocstring style guide for clearskies framework code.
migration_guideComplete guide for migrating from clearskies v1 to v2.
breaking_changesComplete list of breaking changes between v1 and v2.
migration_patternsCommon v1 patterns and their v2 equivalents.

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/clearskies-py/mcp-server'

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