Skip to main content
Glama

Create a function (what the bot does by itself)

dosai_create_function

Give the DOS AI bot a new ability that it then uses by itself in its own conversations with clients; you never run it. Two ways. (1) Ready template: pass template_id from dosai_list_function_templates and its config, e.g. calendar_id for booking or spreadsheet_id for a Google Sheet (the owner first shares it with the bot's Google address; check with dosai_check_google_access). (2) Own integration: pass name, description (when the bot should call it), webhook_url (https) and parameters. This call sends nothing anywhere: it saves the function, and later, when the bot decides to use it in a conversation, the platform POSTs the arguments as JSON to that address. Because client data will go there, this way takes two steps (the owner confirms the address). A service that needs GET is switched by the owner in the cabinet (dosai_get_cabinet_link, place=functions). The function is on at once: verify with dosai_test_bot, a dry run whose tool_calls show which function the bot called and what would have happened. A secret in config (a Telegram bot key) passes through this chat, warn the owner. Requires editor role.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_id": "<project_id>"
    },
    "name": "dosai_create_function"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoLatin snake_case. Default: the template's name; required for an own integration. Two functions cannot share a name.
configNoTemplate settings by key, as listed in dosai_list_function_templates.
headersNoOwn integration only, e.g. an Authorization header.
parametersNoOwn integration only: what the bot takes from the conversation and sends.
project_idYesFrom dosai_list_projects.
descriptionNoWhen the bot should call it, in plain words. Default: the template's text.
template_idNo
webhook_urlNoOwn integration only: the https address that receives the call.
confirm_tokenNoLeave empty on the first call: it changes nothing and returns what will happen and a code. Ask the owner; only after their explicit "yes" call again with the same arguments and this code.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / http_method
      Removed value: -{
      -  "enum": [
      -    "POST",
      -    "GET",
      -    "PUT",
      -    "PATCH"
      -  ],
      -  "type": "string"
      -}
  2. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedInput schema / properties / project_id / description
      Previous value: -"Project id, as returned by dosai_list_projects."New value: +"From dosai_list_projects."
  3. Changed1 schema field changed
    • removedInput schema / properties / project_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  4. Added

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnlyHint=false, destructiveHint=false and openWorldHint=true; the description goes far beyond them. It discloses that the call itself sends nothing externally, that a later platform POST propagates client data to the configured address, that own integrations require a two-step owner confirmation, that the function is active immediately, that editor role is required, and that secrets in config transit the chat and warrant a warning.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Dense but well front-loaded: the one-line purpose precedes the numbered (1)/(2) path breakdown, and caveats follow. A few clauses are run-on and pack multiple facts per sentence, but every sentence carries actionable information about prerequisites, confirmation, or verification, so little is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a nine-parameter, nested-object creation tool with no output schema and a confirmation handshake, the definition covers the preconditions (roles, sharing, access check), the two modes, the deferred external-call behavior, and the dry-run verification path. An agent could execute this correctly end-to-end, including handling the two-step confirm_token flow, without consulting anything else.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 89% schema coverage the schema already carries most parameter meaning, but the description adds real semantic context: template_id pairs with config keys (calendar_id, spreadsheet_id), name defaults to the template's name and must be unique, parameters describe what the bot extracts from the conversation, and confirm_token's empty-first-call protocol is explained as a workflow rather than just a field.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Give the DOS AI bot a new ability' / create a function) and immediately clarifies the crucial semantic: the bot invokes it autonomously, the caller never runs it. That framing alone distinguishes it from siblings like dosai_test_bot or dosai_update_function without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Lays out both creation paths (ready template vs own integration) and names the prerequisite and follow-up tools for each: dosai_list_function_templates for template_id, dosai_check_google_access for shared spreadsheets, dosai_get_cabinet_link for switching to GET, dosai_test_bot for verification. It also gives explicit ordering guidance (confirm_token first call vs second) rather than leaving sequencing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources