Template:Tool: Difference between revisions
From Public AI Wiki
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
< | <noinclude> | ||
This template is used to define a tool in the Public AI system. | |||
{{#cargo_declare: | |||
_table=Tools | _table=Tools | ||
|description=Text | |description=Text | ||
| Line 5: | Line 8: | ||
|has_resources=Boolean | |has_resources=Boolean | ||
}} | }} | ||
{{ | |||
== Parameters == | |||
|description= | * '''name''' - Display name of the tool (defaults to page name) | ||
|tool_type= | * '''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 == | |||
<pre> | |||
{{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... | |||
}} | }} | ||
</pre> | |||
<templatedata> | |||
{ | |||
"description": "Registers a tool in the Public AI system.", | |||
"params": { | |||
"name": { | |||
"label": "Tool name", | |||
"type": "string", | |||
"description": "Display name (defaults to page name)" | |||
}, | |||
"description": { | |||
"label": "Description", | |||
"type": "string", | |||
"required": true | |||
}, | |||
"tool_type": { | |||
"label": "Tool type", | |||
"type": "string", | |||
"default": "General" | |||
}, | |||
"has_resources": { | |||
"label": "Has resources", | |||
"type": "string", | |||
"default": "false" | |||
}, | |||
"overview": { | |||
"label": "Overview", | |||
"type": "content" | |||
}, | |||
"usage": { | |||
"label": "Usage instructions", | |||
"type": "content" | |||
} | |||
} | |||
} | |||
</templatedata> | |||
[[Category:Templates]] | |||
</noinclude> | |||
<includeonly> | |||
{| class="wikitable" style="float:right; margin-left:1em; width:300px;" | {| class="wikitable" style="float:right; margin-left:1em; width:300px;" | ||
! colspan="2" style="text-align:center; font-size:larger;" | {{{name|{{PAGENAME}}}}} | ! colspan="2" style="text-align:center; font-size:larger;" | {{{name|{{PAGENAME}}}}} | ||
| Line 34: | Line 90: | ||
{{{usage|}}} | {{{usage|}}} | ||
{{#cargo_store: | |||
_table=Tools | |||
|description={{{description|}}} | |||
|tool_type={{{tool_type|General}}} | |||
|has_resources={{{has_resources|false}}} | |||
= | |||
{{ | |||
| | |||
| | |||
| | |||
}} | }} | ||
Latest revision as of 03:28, 23 December 2025
This template is used to define a tool in the Public AI system.
This template defines the table "Tools". View table.
Parameters[edit source]
- 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[edit source]
{{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...
}}
Registers a tool in the Public AI system.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Tool name | name | Display name (defaults to page name) | String | optional |
| Description | description | no description | String | required |
| Tool type | tool_type | no description
| String | optional |
| Has resources | has_resources | no description
| String | optional |
| Overview | overview | no description | Content | optional |
| Usage instructions | usage | no description | Content | optional |