Skip to content

Add Tinker MCP tool (opt-in via config)#807

Merged
pushpak1300 merged 1 commit into
mainfrom
add_tinker_tool
May 18, 2026
Merged

Add Tinker MCP tool (opt-in via config)#807
pushpak1300 merged 1 commit into
mainfrom
add_tinker_tool

Conversation

@pushpak1300
Copy link
Copy Markdown
Member

@pushpak1300 pushpak1300 commented May 15, 2026

Currently the tinker MCP tool is gone (removed in #629), so agents have to use php artisan tinker --execute '...' via shell. That round-trips through shell escaping and bites pretty consistently. As #667 points out, agents tend to fail 2-3 times on quoting before they get a snippet right.

This PR brings the tool back, but opt-in so it stays off by default. Flip it on with:

```php
// config/boost.php
'tinker_tool_enabled' => true,
```

core.blade.php swaps the guidance to prefer the MCP tool when the flag is on, and keeps the existing --execute instructions otherwise.
Closes #667.

@TonsiTT
Copy link
Copy Markdown

TonsiTT commented May 18, 2026

Thanks. Going to switch to this branch.
To show how much it sucked, here is a example of codex trying to use Tinker Tool. It tried 11 times and failed each time and it literally ended up encoding the whole code block to base64 and running it via decode on Tinker as it couldn't figure out how to use the cli version with normal code block due to formatting issue

Ran 11 commands, used Laravel Boost
Ran php artisan tinker
The interactive Tinker paste split the closure at a ternary line, so that attempt didn’t run the validation loop. I’m switching to a single --execute eval(base64_decode(...)) payload so the same app-context code runs as one PHP block.
Ran 2 commands
Ran base64 -w0 <<'PHP' $categor....
Ran php artisan tinker --execute='eval(base64_decode("JGNhdGVnb3J5S.......=="));

@pushpak1300
Copy link
Copy Markdown
Member Author

pushpak1300 commented May 18, 2026

which model are you using ? @TonsiTT

@pushpak1300 pushpak1300 merged commit cebd69e into main May 18, 2026
24 of 44 checks passed
@pushpak1300 pushpak1300 deleted the add_tinker_tool branch May 18, 2026 12:23
@rforced
Copy link
Copy Markdown

rforced commented May 18, 2026

@pushpak1300 where does that configuration go in boost.php?

'tinker_tool_enabled' => true,

Is it nested under another key?

@pushpak1300
Copy link
Copy Markdown
Member Author

nope @rforced

@rforced
Copy link
Copy Markdown

rforced commented May 18, 2026

@pushpak1300 can you comment on why the setting isn't nested under the MCP settings? Right now we have this. Having this setting at top level is starting to make boost's configuration feel very inconsistent

    'mcp' => [
        'tools' => [
            'exclude' => [
                GetAbsoluteUrl::class,
            ],
        ],
    ],

@pushpak1300
Copy link
Copy Markdown
Member Author

both can work. this is experimental feature. so i haven't documented anything.

@rforced
Copy link
Copy Markdown

rforced commented May 18, 2026

I understand, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing Tinker MCP Tool

3 participants