{"record":{"id":"b15c160d70a9c907","repo":"ComposioHQ/composio","slug":"missing-title-in-param-schema-param-schema","errorCode":null,"errorMessage":"Missing 'title' in param_schema: {param_schema}","messagePattern":"Missing 'title' in param_schema: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/composio/utils/shared.py","lineNumber":613,"sourceCode":"    )\n\n\ndef pydantic_model_from_param_schema(param_schema: t.Dict) -> t.Type:\n    \"\"\"\n    Dynamically creates a Pydantic model from a schema dictionary.\n\n    :param param_schema: Schema with 'title', 'properties', and optionally 'required' keys.\n    :return: A Pydantic model class for the defined schema.\n\n    :raised ValueError: Invalid 'type' for property or recursive model creation.\n\n    Note: Requires global `schema_type_python_type_dict` for type mapping and\n        `fallback_values` for default values.\n    \"\"\"\n    required_fields = {}\n    optional_fields = {}\n    if \"title\" not in param_schema:\n        raise ValueError(f\"Missing 'title' in param_schema: {param_schema}\")\n\n    param_title = str(param_schema[\"title\"]).replace(\" \", \"\")\n    required_props = param_schema.get(\"required\", [])\n\n    if param_schema.get(\"type\") == \"array\":\n        # print(\"param_schema inside array - \", param_schema)\n        item_schema = param_schema.get(\"items\")\n        if item_schema:\n            ItemType = t.cast(\n                t.Type,\n                json_schema_to_pydantic_type(\n                    json_schema=item_schema,\n                ),\n            )\n            return t.List[ItemType]  # type: ignore\n        return t.List\n\n    for prop_name, prop_info in param_schema.get(\"properties\", {}).items():","sourceCodeStart":595,"sourceCodeEnd":631,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/python/composio/utils/shared.py#L595-L631","documentation":"pydantic_model_from_param_schema requires param_schema to contain a \"title\" key, which becomes the generated Pydantic model's name. A missing title means the converter cannot construct a model class and raises ValueError echoing the schema.","triggerScenarios":"Calling pydantic_model_from_param_schema (or get_signature_format_from_schema_params) with a param schema dict lacking \"title\" — common with hand-built schemas or stripped-down specs where only type/properties were provided.","commonSituations":"Custom tools defined with minimal schemas (omitting the title the generator expects); transformations that drop title fields; backend schema versions that stopped including titles after a client update.","solutions":["Add \"title\" to the param schema: a PascalCase name like \"SearchInput\" (spaces are stripped in the model name)","If building custom tools, use the SDK's standard tool-definition helpers which populate title automatically","Check for accidental overwriting of param_schema dicts before passing them in"],"exampleFix":"# before\nmodel = pydantic_model_from_param_schema({\"type\": \"object\", \"properties\": {}})\n# after\nmodel = pydantic_model_from_param_schema({\"title\": \"SearchInput\", \"type\": \"object\", \"properties\": {}})","handlingStrategy":"validation","validationCode":"def has_title(param_schema):\n    return isinstance(param_schema, dict) and \"title\" in param_schema","typeGuard":"def is_valid_param_schema(p) -> bool:\n    return isinstance(p, dict) and isinstance(p.get(\"title\"), str) and p[\"title\"].strip() != \"\"","tryCatchPattern":"try:\n    model = pydantic_model_from_param_schema(p)\nexcept ValueError as e:\n    if \"Missing 'title'\" in str(e):\n        p = {**p, \"title\": derived_name}\n        model = pydantic_model_from_param_schema(p)","preventionTips":["Always include a PascalCase title when authoring param schemas","Use SDK tool-definition helpers that populate title automatically","Assert title presence in tests for custom tool schemas"],"tags":["pydantic","param-schema","missing-title","model-generation"],"backgroundTag":"missing-schema-title","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}