Skip to main content
Glama

MCP Server Airflow Token

post_pool

Create a pool in Apache Airflow to manage task concurrency by defining available slots and descriptions for resource allocation.

Instructions

Create a pool

Input Schema

NameRequiredDescriptionDefault
descriptionNo
include_deferredNo
nameYes
slotsYes

Input Schema (JSON Schema)

{ "properties": { "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Description" }, "include_deferred": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "title": "Include Deferred" }, "name": { "title": "Name", "type": "string" }, "slots": { "title": "Slots", "type": "integer" } }, "required": [ "name", "slots" ], "type": "object" }

Implementation Reference

  • The asynchronous handler function for the 'post_pool' tool. It constructs a Pool object using the input parameters and invokes the Airflow PoolApi to create the pool, returning the response as text content.
    async def post_pool( name: str, slots: int, description: Optional[str] = None, include_deferred: Optional[bool] = None, ) -> List[Union[types.TextContent, types.ImageContent, types.EmbeddedResource]]: """ Create a pool. Args: name: The pool name. slots: The number of slots. description: The pool description. include_deferred: Whether to include deferred tasks in slot calculations. Returns: The created pool details. """ pool = Pool( name=name, slots=slots, ) if description is not None: pool.description = description if include_deferred is not None: pool.include_deferred = include_deferred response = pool_api.post_pool(pool=pool) return [types.TextContent(type="text", text=str(response.to_dict()))]
  • Registration of the 'post_pool' tool within the get_all_functions list, which provides the handler function, tool name, description, and mutability flag for MCP tool registration.
    def get_all_functions() -> list[tuple[Callable, str, str, bool]]: """Return list of (function, name, description, is_read_only) tuples for registration.""" return [ (get_pools, "get_pools", "List pools", True), (get_pool, "get_pool", "Get a pool by name", True), (delete_pool, "delete_pool", "Delete a pool", False), (post_pool, "post_pool", "Create a pool", False), (patch_pool, "patch_pool", "Update a pool", False), ]

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/nikhil-ganage/mcp-server-airflow-token'

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