Skip to content
Discussion options

You must be logged in to vote

A couple of misconceptions here.

  1. :pre runs before setting the variables defined in the preset, :post runs after. Both these things happen when the preset is applied, well before the request is sent. So :post doesn't do what you think.

  2. The tools that are sent with a request to an LLM depend only on gptel-tools, whose value you can set in many ways (transient menu, elisp) and is not controlled by what MCP servers are connected.

To solve your timing issue, you just have to start the MCP server synchronously.

:pre (lambda () (gptel-mcp-connect '("mcptool") 'sync))

You can set the specific tools you want with :tools in the preset, as usual.

(Be sure to update the gptel and mcp packages b…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ag91
Comment options

Answer selected by ag91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants