mmtools

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinSearchTermLength = 3
	MaxSearchTermLength = 300
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GetGithubIssueArgs

type GetGithubIssueArgs struct {
	RepoOwner string `jsonschema_description:"The owner of the repository to get issues from. Example: 'mattermost'"`
	RepoName  string `jsonschema_description:"The name of the repository to get issues from. Example: 'mattermost-plugin-ai'"`
	Number    int    `jsonschema_description:"The issue number to get. Example: '1'"`
}

type GetJiraIssueArgs

type GetJiraIssueArgs struct {
	InstanceURL string   `jsonschema_description:"The URL of the Jira instance to get the issue from. Example: 'https://mattermost.atlassian.net'"`
	IssueKeys   []string `jsonschema_description:"The issue keys of the Jira issues to get. Example: 'MM-1234'"`
}

type LookupMattermostUserArgs

type LookupMattermostUserArgs struct {
	Username string `jsonschema_description:"The username of the user to lookup without a leading '@'. Example: 'firstname.lastname'"`
}

type MMToolProvider

type MMToolProvider struct {
	// contains filtered or unexported fields
}

MMToolProvider implements ToolProvider with all built-in Mattermost tools

func NewMMToolProvider

func NewMMToolProvider(pluginAPI mmapi.Client, search *search.Search, httpClient *http.Client) *MMToolProvider

NewMMToolProvider creates a new tool provider

func (*MMToolProvider) GetTools

func (p *MMToolProvider) GetTools(bot *bots.Bot) []llm.Tool

GetTools returns all available tools. Tool execution is restricted at runtime via WithToolsDisabled() based on context (e.g., DM vs channel). This allows LLMs to be aware of tool capabilities even when they can't be executed in the current context.

type SearchServerArgs

type SearchServerArgs struct {
	Term string `jsonschema_description:"The terms to search for in the server. Must be more than 3 and less than 300 characters."`
}

type ToolProvider

type ToolProvider interface {
	GetTools(bot *bots.Bot) []llm.Tool
}

ToolProvider provides built-in tools for the AI assistant

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL