Template:Tool: Difference between revisions

From Public AI Wiki
No edit summary
No edit summary
Line 1: Line 1:
<noinclude>
<includeonly>{{#cargo_declare:
Template for storing MCP tools using Cargo.
_table=Tools
{{#cargo_declare:
|description=Text
_table = Tools
|tool_type=String
|ToolName = String
|has_resources=Boolean
|Description = Text
}}
|RepoURL = URL
{{#cargo_store:
|Author = String
_table=Tools
|ToolType = String
|description={{{description|}}}
|tool_type={{{tool_type|General}}}
|has_resources={{{has_resources|false}}}
}}
 
{| class="wikitable" style="float:right; margin-left:1em; width:300px;"
! colspan="2" style="text-align:center; font-size:larger;" | {{{name|{{PAGENAME}}}}}
|-
| '''Type:''' || {{{tool_type|General}}}
|-
| '''Description:''' || {{{description|}}}
|}
 
== Overview ==
{{{overview|}}}
 
== Resources ==
{{#cargo_query:
tables=ToolResources
|where=tool='{{PAGENAME}}'
|fields=_pageName=Resource,country,region
|format=ul
}}
}}
<templatedata>
{
  "description": "Registers an MCP tool in the shared tools database.",
  "params": {
    "ToolName": {
      "label": "Tool name",
      "type": "string",
      "required": true
    },
    "Description": {
      "label": "Description",
      "type": "string",
      "required": true
    },
    "RepoURL": {
      "label": "Repository URL",
      "type": "string"
    },
    "Author": {
      "label": "Author",
      "type": "string"
    },
    "ToolType": {
      "label": "Tool type",
      "type": "string"
    }
  }
}
</templatedata>
</noinclude>
<includeonly>
<div style="border: 1px solid #ddd; padding: 15px; margin-bottom: 20px; border-radius: 5px; background-color: #f9f9f9;">


=== {{{ToolName|}}} ===
== Usage ==
{{{usage|}}}


'''{{{Description|}}}'''
[[Category:Tools]]
[[Category:{{{tool_type|General}}} Tools]]
</includeonly><noinclude>
This template is used to define a tool in the Public AI system.


{{#if:{{{RepoURL|}}}|* '''Repository:''' {{{RepoURL|}}}}}
== Parameters ==
{{#if:{{{Author|}}}|* '''Author:''' {{{Author|}}}}}
* '''name''' - Display name of the tool (defaults to page name)
{{#if:{{{ToolType|}}}|* '''Type:''' {{{ToolType|}}}}}
* '''description''' - Brief description of what the tool does
* '''tool_type''' - Category of tool (e.g., "Crisis Support", "Transit", "Mapping")
* '''has_resources''' - Boolean indicating if tool has locale-specific resources
* '''overview''' - Detailed overview of the tool
* '''usage''' - How to use the tool


</div>
== Example ==
{{#cargo_store:
<pre>
_table = Tools
{{Tool
|ToolName = {{{ToolName|}}}
|name=Suicide Hotline
|Description = {{{Description|}}}
|description=Crisis support hotlines by country
|RepoURL = {{{RepoURL|}}}
|tool_type=Crisis Support
|Author = {{{Author|}}}
|has_resources=true
|ToolType = {{{ToolType|}}}
|overview=Provides access to suicide prevention hotlines...
|usage=Query by country or region...
}}
}}
</includeonly>
</pre>
 
[[Category:Templates]]
</noinclude>

Revision as of 03:19, 23 December 2025

This template is used to define a tool in the Public AI system.

Parameters

  • name - Display name of the tool (defaults to page name)
  • description - Brief description of what the tool does
  • tool_type - Category of tool (e.g., "Crisis Support", "Transit", "Mapping")
  • has_resources - Boolean indicating if tool has locale-specific resources
  • overview - Detailed overview of the tool
  • usage - How to use the tool

Example

{{Tool
|name=Suicide Hotline
|description=Crisis support hotlines by country
|tool_type=Crisis Support
|has_resources=true
|overview=Provides access to suicide prevention hotlines...
|usage=Query by country or region...
}}