mcptools

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mcptools is every unary API method as an MCP tool, generated from the proto schema, so the tool list never drifts from the API.

Index

Constants

This section is empty.

Variables

View Source
var Tools = []Tool{
	{
		Name:        "list_asks",
		Procedure:   "/agents.v1.InboxService/ListAsks",
		Description: "ListAsks lists the questions agents are waiting on, and with answered_since also the ones answered since then.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"answered_since\":{\"description\":\"answered_since adds the asks answered after it; unset lists open asks only.\",\"format\":\"date-time\",\"type\":\"string\"},\"project\":{\"description\":\"project is the storage root whose asks to list; empty lists every project's.\",\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v1.ListAsksRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := agentsv1connect.NewInboxServiceClient(hc, baseURL, opts...).ListAsks(ctx, connect.NewRequest(req.(*v1.ListAsksRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "answer_ask",
		Procedure:   "/agents.v1.InboxService/AnswerAsk",
		Description: "AnswerAsk answers an open ask by its id, one value per numbered question, and delivers the answer to the agent that asked.",
		InputSchema: "{\"$defs\":{\"agents.v1.Answer\":{\"additionalProperties\":false,\"description\":\"An Answer is the value given to one question, by its number.\",\"properties\":{\"n\":{\"type\":\"integer\"},\"value\":{\"type\":\"string\"}},\"type\":\"object\"}},\"additionalProperties\":false,\"properties\":{\"answered_by\":{\"description\":\"answered_by is the way in to record, asks or skill; empty is the API.\",\"type\":\"string\"},\"answers\":{\"description\":\"answers names questions by number; a question not named takes its default.\",\"items\":{\"$ref\":\"#/$defs/agents.v1.Answer\"},\"type\":\"array\"},\"id\":{\"type\":\"string\"},\"match\":{\"description\":\"match finds the open ask by its task, or project:task, as the inbox command takes it, in place of id.\",\"type\":\"string\"},\"values\":{\"description\":\"values are the answers as the inbox command takes them, N=VALUE each, in place of answers.\",\"items\":{\"type\":\"string\"},\"type\":\"array\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v1.AnswerAskRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := agentsv1connect.NewInboxServiceClient(hc, baseURL, opts...).AnswerAsk(ctx, connect.NewRequest(req.(*v1.AnswerAskRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "list_workspaces",
		Procedure:   "/agents.v1.AgentService/ListWorkspaces",
		Description: "ListWorkspaces lists the Herdr workspaces, each with its agents.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v1.ListWorkspacesRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := agentsv1connect.NewAgentServiceClient(hc, baseURL, opts...).ListWorkspaces(ctx, connect.NewRequest(req.(*v1.ListWorkspacesRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "list_agents",
		Procedure:   "/agents.v1.AgentService/ListAgents",
		Description: "ListAgents lists the agents, in one workspace or in all of them.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"workspace_id\":{\"description\":\"workspace_id narrows the list to one workspace; empty lists every one.\",\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v1.ListAgentsRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := agentsv1connect.NewAgentServiceClient(hc, baseURL, opts...).ListAgents(ctx, connect.NewRequest(req.(*v1.ListAgentsRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "get_agent_status",
		Procedure:   "/agents.v1.AgentService/GetAgentStatus",
		Description: "GetAgentStatus is one agent's state, found by name.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"name\":{\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v1.GetAgentStatusRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := agentsv1connect.NewAgentServiceClient(hc, baseURL, opts...).GetAgentStatus(ctx, connect.NewRequest(req.(*v1.GetAgentStatusRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "send_text",
		Procedure:   "/agents.v1.AgentService/SendText",
		Description: "SendText types text into an agent's pane, as a prompt when submit is set.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"name\":{\"type\":\"string\"},\"submit\":{\"description\":\"submit sends Enter after the text, so the agent takes it as a prompt.\",\"type\":\"boolean\"},\"text\":{\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v1.SendTextRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := agentsv1connect.NewAgentServiceClient(hc, baseURL, opts...).SendText(ctx, connect.NewRequest(req.(*v1.SendTextRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "close_workspace",
		Procedure:   "/agents.v1.AgentService/CloseWorkspace",
		Description: "CloseWorkspace closes a workspace, focusing another one first when focus_id is set.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"focus_id\":{\"description\":\"focus_id is the workspace to focus before the close, empty for none.\",\"type\":\"string\"},\"id\":{\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v1.CloseWorkspaceRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := agentsv1connect.NewAgentServiceClient(hc, baseURL, opts...).CloseWorkspace(ctx, connect.NewRequest(req.(*v1.CloseWorkspaceRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "list_artifacts",
		Procedure:   "/f10.v1.ArtifactService/ListArtifacts",
		Description: "ListArtifacts lists a task's files: its plan, spike report, handoff, verdicts, review findings and demo files, each by kind and name.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"project\":{\"description\":\"project is a project id or the path of its checkout.\",\"type\":\"string\"},\"task\":{\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.ListArtifactsRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewArtifactServiceClient(hc, baseURL, opts...).ListArtifacts(ctx, connect.NewRequest(req.(*v11.ListArtifactsRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "get_artifact",
		Procedure:   "/f10.v1.ArtifactService/GetArtifact",
		Description: "GetArtifact reads one of a task's files, by the kind and name ListArtifacts gave it.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"kind\":{\"description\":\"ARTIFACT_KIND_DEMO: the demo report and the files it references, such as screenshots; ARTIFACT_KIND_FINDINGS: a review round's findings\",\"enum\":[\"ARTIFACT_KIND_UNSPECIFIED\",\"ARTIFACT_KIND_PLAN\",\"ARTIFACT_KIND_SPIKE\",\"ARTIFACT_KIND_HANDOFF\",\"ARTIFACT_KIND_DEMO\",\"ARTIFACT_KIND_VERDICT\",\"ARTIFACT_KIND_FINDINGS\"],\"type\":\"string\"},\"name\":{\"type\":\"string\"},\"project\":{\"type\":\"string\"},\"task\":{\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.GetArtifactRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewArtifactServiceClient(hc, baseURL, opts...).GetArtifact(ctx, connect.NewRequest(req.(*v11.GetArtifactRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "create_task",
		Procedure:   "/f10.v1.TaskService/CreateTask",
		Description: "CreateTask creates a task in a project's tracker and returns its id.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"body\":{\"description\":\"body is the task's text in markdown.\",\"type\":\"string\"},\"check\":{\"description\":\"check refuses as a create would before it reads the task, where nothing here creates tasks, and creates nothing, so f10 task create leaves stdin unread for the caller to fall back on.\",\"type\":\"boolean\"},\"labels\":{\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"markdown\":{\"description\":\"markdown is the whole task, `# \\u003ctitle\\u003e` on its first line, as f10 task create reads it. When set it wins over title and body.\",\"type\":\"string\"},\"parent\":{\"description\":\"parent is the id of the task this one is a subtask of.\",\"type\":\"string\"},\"priority\":{\"type\":\"string\"},\"project\":{\"description\":\"project is a project id, such as github.com/acme/widgets, or the path of its main checkout.\",\"type\":\"string\"},\"properties\":{\"additionalProperties\":{\"type\":\"string\"},\"description\":\"properties sets the tracker's named properties.\",\"type\":\"object\"},\"status\":{\"type\":\"string\"},\"title\":{\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.CreateTaskRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewTaskServiceClient(hc, baseURL, opts...).CreateTask(ctx, connect.NewRequest(req.(*v11.CreateTaskRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "get_task",
		Procedure:   "/f10.v1.TaskService/GetTask",
		Description: "GetTask reads a task from a project's tracker, comments included.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"id\":{\"type\":\"string\"},\"project\":{\"type\":\"string\"},\"skip_images\":{\"description\":\"skip_images leaves the images the task links unread.\",\"type\":\"boolean\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.GetTaskRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewTaskServiceClient(hc, baseURL, opts...).GetTask(ctx, connect.NewRequest(req.(*v11.GetTaskRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "get_board",
		Procedure:   "/f10.v1.BoardService/GetBoard",
		Description: "GetBoard is what changed in a project over a window, or with the state view, where every task stands and who owes the next move.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"all\":{\"type\":\"boolean\"},\"checkouts\":{\"description\":\"checkouts, groups and all widen the board to several projects, as f10 board's -C, --group and --all do.\",\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"groups\":{\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"project\":{\"type\":\"string\"},\"remote\":{\"description\":\"remote asks the host and tracker even where local facts would do.\",\"type\":\"boolean\"},\"since\":{\"description\":\"since starts the window; unset means today, else the last working day.\",\"format\":\"date-time\",\"type\":\"string\"},\"view\":{\"description\":\"BOARD_VIEW_CHANGES: what changed in the window; BOARD_VIEW_STATE: where every task stands and who owes the next move\",\"enum\":[\"BOARD_VIEW_UNSPECIFIED\",\"BOARD_VIEW_CHANGES\",\"BOARD_VIEW_STATE\"],\"type\":\"string\"},\"window\":{\"description\":\"window names the window as f10 board takes it: today, yesterday, last-workday, this-week, last-week, a date or an RFC 3339 time. When set it wins over since, and is read against the user's workdays.\",\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.GetBoardRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewBoardServiceClient(hc, baseURL, opts...).GetBoard(ctx, connect.NewRequest(req.(*v11.GetBoardRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "hello",
		Procedure:   "/f10.v1.DaemonService/Hello",
		Description: "Hello is the first call a client makes, to learn which daemon answers and whether this client may keep it or must replace it.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"api_version\":{\"description\":\"api_version is the API version the client was built against.\",\"type\":\"integer\"},\"version\":{\"description\":\"version is the client's release version, such as 0.62.0.\",\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.HelloRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewDaemonServiceClient(hc, baseURL, opts...).Hello(ctx, connect.NewRequest(req.(*v11.HelloRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "get_daemon_status",
		Procedure:   "/f10.v1.DaemonService/GetDaemonStatus",
		Description: "GetDaemonStatus is who the daemon is, the drives it runs, the projects it watches and its tailnet listener.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.GetDaemonStatusRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewDaemonServiceClient(hc, baseURL, opts...).GetDaemonStatus(ctx, connect.NewRequest(req.(*v11.GetDaemonStatusRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "stop_daemon",
		Procedure:   "/f10.v1.DaemonService/StopDaemon",
		Description: "StopDaemon stops the daemon; a second call without drain cuts a drain short.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"drain\":{\"description\":\"drain lets each drive reach its next tick before it stops.\",\"type\":\"boolean\"},\"upgrade\":{\"description\":\"upgrade says a newer daemon follows and resumes the drained drives.\",\"type\":\"boolean\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.StopDaemonRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewDaemonServiceClient(hc, baseURL, opts...).StopDaemon(ctx, connect.NewRequest(req.(*v11.StopDaemonRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "watch_project",
		Procedure:   "/f10.v1.DaemonService/WatchProject",
		Description: "WatchProject adds or refreshes a project the daemon runs watch passes for, and starts a pass now.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"dir\":{\"type\":\"string\"},\"env\":{\"description\":\"env is the allowlisted environment each pass runs with. Honored only on the unix socket, because a remote client has no local session to pass.\",\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"root\":{\"description\":\"root is the project's storage root; dir its main checkout.\",\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.WatchProjectRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewDaemonServiceClient(hc, baseURL, opts...).WatchProject(ctx, connect.NewRequest(req.(*v11.WatchProjectRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "list_projects",
		Procedure:   "/f10.v1.ProjectService/ListProjects",
		Description: "ListProjects lists the projects the daemon watches or runs a drive in, with the id every other request's project field takes.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.ListProjectsRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewProjectServiceClient(hc, baseURL, opts...).ListProjects(ctx, connect.NewRequest(req.(*v11.ListProjectsRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "get_run_status",
		Procedure:   "/f10.v1.RunService/GetRunStatus",
		Description: "GetRunStatus is where f10 runs stand: one task's, a project's, or every live run on the machine, with the question a stopped run waits on.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"all\":{\"description\":\"all lists every live run on the machine, whatever the project.\",\"type\":\"boolean\"},\"project\":{\"description\":\"project is a project id or the path of its main checkout.\",\"type\":\"string\"},\"task\":{\"description\":\"task narrows the reply to one task's run; empty lists every live run in the project.\",\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.GetRunStatusRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewRunServiceClient(hc, baseURL, opts...).GetRunStatus(ctx, connect.NewRequest(req.(*v11.GetRunStatusRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "start",
		Procedure:   "/f10.v1.RunService/Start",
		Description: "Start runs a task through its flow in a drive, as f10 start does. A discussion or a picked-up PR opens the worktree, workspace and agent, prompted once, since nothing steers an agent that waits for a person.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"after\":{\"description\":\"after is the task this one builds on; base is a branch to start from.\",\"type\":\"string\"},\"agent\":{\"description\":\"agent is a profile name; model overrides only the model.\",\"type\":\"string\"},\"base\":{\"type\":\"string\"},\"chain\":{\"description\":\"chain makes a flow start a range: token, then the one id in tasks, and every id between, as `f10 start A -- B` runs them.\",\"type\":\"boolean\"},\"flow\":{\"description\":\"flow names a declared flow; empty lets the project's rules pick it.\",\"type\":\"string\"},\"mode\":{\"description\":\"START_MODE_SHIP: ship the task through its flow; START_MODE_PLAN: plan the task and stop; START_MODE_DISCUSS: read the task and wait to discuss it\",\"enum\":[\"START_MODE_UNSPECIFIED\",\"START_MODE_SHIP\",\"START_MODE_PLAN\",\"START_MODE_DISCUSS\"],\"type\":\"string\"},\"model\":{\"type\":\"string\"},\"note\":{\"description\":\"note is extra text a discussion's or a pickup's prompt carries. A flow start refuses one, because a driven run takes its instructions from the task.\",\"type\":\"string\"},\"pace\":{\"type\":\"string\"},\"parallel\":{\"description\":\"parallel caps a flow start's tasks running a skill at once; 0 keeps the record's or the default.\",\"type\":\"integer\"},\"pr\":{\"type\":\"string\"},\"project\":{\"type\":\"string\"},\"task\":{\"description\":\"task is the task id; pr picks up an existing PR instead, by url or number.\",\"type\":\"string\"},\"tasks\":{\"description\":\"tasks are the other ids, after token. A discussion opens token's worktree and reads them all, and a flow start runs them in one drive.\",\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"token\":{\"description\":\"token is the argument as f10 start takes it: a task id with its -suffix, a PR url or #n. When set it wins over task and pr, and task names the task a picked-up PR belongs to.\",\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.StartRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewRunServiceClient(hc, baseURL, opts...).Start(ctx, connect.NewRequest(req.(*v11.StartRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "drive",
		Procedure:   "/f10.v1.RunService/Drive",
		Description: "Drive runs a list of tasks through a flow, each once its base has a commit, as f10 start does with several tasks.",
		InputSchema: "{\"$defs\":{\"f10.v1.DriveTask\":{\"additionalProperties\":false,\"description\":\"A DriveTask is one task of a drive, with its own agent profile.\",\"properties\":{\"agent\":{\"type\":\"string\"},\"id\":{\"type\":\"string\"}},\"type\":\"object\"}},\"additionalProperties\":false,\"description\":\"DriveRequest starts or resumes a drive. f10 start sends args. The field form (args unset) is kept for older clients only: a new client calls Start, which runs the same flow start with its closed-task check and plan-only mode. The field form refuses a start of closed tasks.\",\"properties\":{\"agent\":{\"type\":\"string\"},\"answers\":{\"description\":\"answers are the answers to the drive's open asks, `ID=text` for one task or bare text.\",\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"args\":{\"description\":\"args are the drive's arguments as `f10 start` takes them. When set they win over the fields above, so a rerun of a typed command line keys to the record it opened.\",\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"chain\":{\"description\":\"chain runs the tasks one after another, each based on the one before.\",\"type\":\"boolean\"},\"dir\":{\"description\":\"dir is the checkout the drive runs from.\",\"type\":\"string\"},\"env\":{\"description\":\"env is the allowlisted environment the drive runs with. Honored only on the unix socket, because a remote client has no local session to pass.\",\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"every\":{\"description\":\"every is how often the drive polls its tasks; unset keeps the default. (a duration in seconds, such as 90s or 1.5s)\",\"type\":\"string\"},\"flow\":{\"type\":\"string\"},\"model\":{\"type\":\"string\"},\"pace\":{\"type\":\"string\"},\"parallel\":{\"type\":\"integer\"},\"plan_first\":{\"description\":\"plan_first is refused: a plan-only start is StartRequest with mode START_MODE_PLAN.\",\"type\":\"boolean\"},\"project\":{\"type\":\"string\"},\"resume\":{\"description\":\"resume picks up the drive record with this number.\",\"type\":\"integer\"},\"tasks\":{\"items\":{\"$ref\":\"#/$defs/f10.v1.DriveTask\"},\"type\":\"array\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.DriveRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewRunServiceClient(hc, baseURL, opts...).Drive(ctx, connect.NewRequest(req.(*v11.DriveRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "finish",
		Procedure:   "/f10.v1.RunService/Finish",
		Description: "Finish merges a task's PR and removes its worktree, branch and workspace.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"close\":{\"description\":\"close names the bundle riders the PR delivers: ids, all or none.\",\"type\":\"string\"},\"empty\":{\"description\":\"empty finishes a branch never pushed that adds nothing.\",\"type\":\"boolean\"},\"ignore_checks\":{\"type\":\"boolean\"},\"keep\":{\"description\":\"keep keeps a spike's experiment, committed on a branch.\",\"type\":\"boolean\"},\"merge\":{\"description\":\"MERGE_MODE_PR: merge the task's own PR; MERGE_MODE_FORCE: merge the PR even when someone else opened it; MERGE_MODE_LOCAL: merge a branch never pushed into the local default branch; MERGE_MODE_CLOSE: close without merging\",\"enum\":[\"MERGE_MODE_UNSPECIFIED\",\"MERGE_MODE_PR\",\"MERGE_MODE_FORCE\",\"MERGE_MODE_LOCAL\",\"MERGE_MODE_CLOSE\"],\"type\":\"string\"},\"project\":{\"type\":\"string\"},\"task\":{\"type\":\"string\"},\"yes\":{\"description\":\"yes closes the caller's own workspace after the report, when the caller runs inside the task's workspace, instead of refusing.\",\"type\":\"boolean\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.FinishRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewRunServiceClient(hc, baseURL, opts...).Finish(ctx, connect.NewRequest(req.(*v11.FinishRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "forward",
		Procedure:   "/f10.v1.RunService/Forward",
		Description: "Forward hands text to the agent working on a task, as f10 forward does.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"project\":{\"type\":\"string\"},\"task\":{\"description\":\"task is the task id, with a -suffix for one of its parallel worktrees.\",\"type\":\"string\"},\"text\":{\"description\":\"text is what the agent is told, such as a command or a note.\",\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.ForwardRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewRunServiceClient(hc, baseURL, opts...).Forward(ctx, connect.NewRequest(req.(*v11.ForwardRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "list_drives",
		Procedure:   "/f10.v1.RunService/ListDrives",
		Description: "ListDrives lists a project's drive records, as f10 status --drives does.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"all\":{\"description\":\"all lists finished and cancelled drives too.\",\"type\":\"boolean\"},\"project\":{\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.ListDrivesRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewRunServiceClient(hc, baseURL, opts...).ListDrives(ctx, connect.NewRequest(req.(*v11.ListDrivesRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
	{
		Name:        "cancel_drive",
		Procedure:   "/f10.v1.RunService/CancelDrive",
		Description: "CancelDrive stops a drive from prompting further and closes its asks, as f10 stop does.",
		InputSchema: "{\"additionalProperties\":false,\"properties\":{\"drive\":{\"description\":\"drive is the drive's number; task, when set instead, is a task id whose drive is stopped.\",\"type\":\"integer\"},\"project\":{\"type\":\"string\"},\"task\":{\"type\":\"string\"}},\"type\":\"object\"}",
		NewRequest:  func() proto.Message { return &v11.CancelDriveRequest{} },
		Call: func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error) {
			res, err := f10v1connect.NewRunServiceClient(hc, baseURL, opts...).CancelDrive(ctx, connect.NewRequest(req.(*v11.CancelDriveRequest)))
			if err != nil {
				return nil, err
			}

			return res.Msg, nil
		},
	},
}

Tools is every unary method, in proto file and declaration order.

Functions

This section is empty.

Types

type Tool

type Tool struct {
	// Name is the method in snake case.
	Name string
	// Procedure is the Connect route, /<package>.<Service>/<Method>.
	Procedure string
	// Description is the rpc's comment.
	Description string
	// InputSchema is the request message as a JSON Schema, with proto field names.
	InputSchema string
	// NewRequest is an empty request message to read the arguments into.
	NewRequest func() proto.Message
	// Call sends req, a NewRequest message, to the API at baseURL.
	Call func(ctx context.Context, hc connect.HTTPClient, baseURL string, req proto.Message, opts ...connect.ClientOption) (proto.Message, error)
}

A Tool is one API method as an MCP tool.

Jump to

Keyboard shortcuts

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